I'm extending a WYSIWYG HTML editor (for Firefox), I want to add tags around a selection. I can't find a function to accomplish this in the Mozilla Midas specification.
There is a command to replace the selection with HTML.
So if I could read the selection contents, I could add my tags to this string.
window.getSelection() almost works, but it gives me nsISelection which converts to a plain-text string.
PS: document.getSelection() returns the plain-text string not even a nsISelection.