Reply to: Getting Cursor PositionJuly 28, 2009 at 8:20 am
I haven't tried this myself, but how about using the JScript string object to do a string comparison of Selection.Text and Selection.ContainerNode.xml (which is actually a property of DOMElement, not DOMNOde). I never can remember the string-comparison functions on String, either, but I'm thinking of the one that will tell you the position where STR1 occurs within STR2.
Thank you mag for your suggest, but comparing the selection.Text does not really work, as the pure XML (e.g. selection is in an empty
) may occur several times in the same XML.
I will have a look at Derek's suggestion to turn the FormattingUpdating off.