It's becoming painfully obvious to me that Mozilla Composer wasn't really designed for extensibility along the lines of what I'm attempting with Abacus (namely, adding support for a secondary markup language).
For instance, Composer adds stylesheets based on the tab you've selected at the bottom. If you select the Tags tab, you get a special stylesheet with lots of yellow image boxes for your elements. So far, so good.
Except for how it applies the stylesheet...
I tried doing an XUL overlay for the stylesheet (EditorAllTags.css). That was unsuccessful. I figured out later that the stylesheet was applied through C++ code:
http://lxr.mozilla.org/seamonkey/source/editor/ui/composer/content/editor.js#1928
http://lxr.mozilla.org/seamonkey/source/editor/libeditor/html/nsHTMLEditor.cpp#3730
This stinks. It'd be much easier if we could just apply stylesheets from the Document Object Model, as DOM-2 Style suggests. I'm tinkering around with that idea (based on DOM-2 Events to tell me when to apply the sheet and when to kill it) to make the styling work properly.
It'd also make sense, from a undo/redo point of view, if the various settings used a single transaction manager, and created alternate "views" for the document being edited. The document itself would remain hidden from the user, though all manipulations the user carried out on a view of the document propagate down into the master doc through a transaction manager. I remember someone on the Composer team long, long ago saying this might be a possibility. (Until the Nvu source gets checked into Mozilla's tree, it'll be a little hard for me to check that...) Having that undo/redo done this way would make it easier/safer for external applications, like DOM Inspector, to become a part of Composer.
Finally, I cannot for the life of me figure out how in Composer a HTML 4.01 Transitional doctype gets in when the document I'm loading already has a doctype tag.
Posted by WeirdAl at May 27, 2004 12:23 PMYou should e-mail David G.
He's really good about helping people out, and I think he would be specifically interestes since yit has to do with extending Composer/NVU.
-Jed
Who's "David G."? I take it you don't mean Daniel Glazman...
Posted by: Alex Vincent at May 28, 2004 4:15 PMIf your document already has a doctype, it is preserved. A doctype is added if and only if your document is doctype-less.
Posted by: Daniel Glazman at May 29, 2004 7:00 AMThat doesn't jibe with what I'm seeing in Mozilla Composer. I'm including an XHTML 1.1 + MathML 2.0 doctype, and it gets fried...
Posted by: Alex Vincent at May 29, 2004 1:49 PMI was wrong. See blog entry dated today for details.
Posted by: Alex Vincent at June 1, 2004 3:57 PM