Hello Tom,
I added some new code to the FileOpenAndSave sample program, as an
example of an application-defined edit to the DOM.
The code is invoked from a new "Edit/Merge Paragraphs" menu item: it
merges the user-selected block-level elements (paragraphs) with the
previous block in the document.
Anyway, this new sample code includes a new OffsetInElement class:
look at how this OffsetInElement class is implemented and used, to
maintain the apparent selection even across a transaction which
removes the selected nodes from the document.
> I'm displaying a context menu when the right mouse button is clicked.
> Unfortunately, the right button collapses the user's selection. Is
> there any way around this?
>
> While I'm at it: I'm using the keyup and keypress event handlers to do
> some formatting when the user enters specific characters, as you
> suggest inhttp://
www.modeltext.com/html/user-interfaces.aspx#extending.