next up previous contents
Next: Editing Up: The Editor Previous: Selections

Text Tags

A text tag is a way of marking a specified section of the text. One text tag can mark a list of ranges, which are specified by a start and an end index:

Once we have a text tag, we can TextTag.htmlconfigure it. It has a font, colour, cursor, justification, line spacing, wrapping, tabulators and so on. Moreover, you can bind events to a text tag, making it active; so when the mouse moves over the text, or the user clicks the text, something exciting happens. This allows you very easily to implement hypertext, references and so on.

When you insert into an editor, the text tags are accommodated appropriately; i.e. if you insert into the middle of a text tag, then the end of the tag is moved accordingly.

Christoph Lueth
Wed May 29 13:20:38 MEST 2002