Document elements
Factor handbook > UI framework > Building user interfaces > Pre-made UI gadgets > Editor gadgets > Documents

Prev:Document locations


Document elements, defined in the documents.elements vocabulary, overlay a hierarchy of structure on top of the flat sequence of characters presented by the document.

The different types of document elements correspond to the standard editing taxonomy:
char-elt

one-word-elt

word-elt

one-line-elt

line-elt ( -- value )

doc-elt


New locations can be created out of existing ones by finding the start or end of a document element nearest to a given location.
prev-elt ( loc document elt -- newloc )

next-elt ( loc document elt -- newloc )