An extensible editor allows integration of extensions that modify the
editor's default behavior and provide customized feedback to users. The
editor includes an event routing model that works to decrease the
occurrence of conflicts between the editor and extensions and between
extensions. Upon the occurrence of an event, the editor routes the event
to each extension before the editor's default handling of the event
occurs. When an extension responds to an event, the extension may
"consume" the event by indicating to the editor not to allow further
processing of the event. After an event has been pre-processed by each
extension, the default editor acts on the event. The editor then routes
the event to each extension again, to allow each extension to process the
event after the default editor has acted. When the post-processing is
completed, each extension is notified of the actions taken by the editor
and by each of the other extensions. The editor includes interfaces
through which extensions are connected to the editor and through which
selection services and highlight rendering services are provided. The
selection services interfaces provide a clear separation of a logical
selection position in the document and the visual feedback provided for
the selection, allowing extensions to be designed that provide customized
selection feedback. The highlight rendering services interfaces provide
an extension with the ability to augment an existing selection without
modifying the actual document.