I'm working on a Web-GUI for a semantic search with a single text-input as a search-box. Typical queries are: "buildings higher than 100 meters".
I want to format the input text as the server answers the question. The entities and operators should be colored to make it easier for the user to see what the computer understood.
Example:
I found thousands of hacks out there to accomplish this, but all of them were really awkward to some degree. I still want it to feel like a text-field. I want the user to be able to move the cursor by clicking and using the key-arrows. While querying the server, the text should of course be black only. The coloring comes from the servers interpretation and ususally is available "as-you-type" (few milliseconds answer-time).
I want this thread to be a discussion of the different possibilities of accomplishing this task and find the best general-purpose solution for everybody.
