Hi! I'm new to this list (and didn't see an archive), so my apologies
if I'm asking things already covered. Also, big thanks to all existing
Mozilla developers out there!

I'm member of a team that develops a content management system, and we
need an editor capable of handling an "extended subset" of HTML; this
will be subset of XHTML, consisting of basic paragraph content markup
(including just tables, list, some semantic and possibly physical markup),
augmented with a few additional semantic markup tags, both block level
and inline tags). We have looked at various full-featured XML-editors, but
even though there are a few reasonably nice WYSIWYG-editors (like
XXE from XMLMind, http://www.xmlmind.com), nothing seems to be 'perfect'
for our needs. XML-editors are in some ways "too powerful"; we only need
subset of the features, but user interface has to be simple and intuitive.
We just don't need the full versatility of "feed dtd and css and you're
done" (although it certainly is a nice thing to have); instead of structure
of the document, UI is the most important factor for us (power users will
likely have the option of using an XML-editor, but most 'normal' users
would prefer something simpler).

The other alternative (from going to full XML-editor down) is to expand
an existing HTML-editor (or even write one from scratch...). Since I
have been a Mozilla-user for almost a year now, I thought that Mozilla's
HTML-editor might be a perfect fit here.

I started looking at the source tree, but since I'm not (yet?) a Mozilla-developer,
it is...um... quite a task. :-)
I have done some C++-development, and am Javascript literate, so
getting to understand code should be at least possible if not easy.
The fact that UI is defined using XUL, and much of high-level functionality
written in Javascript should make task a fair bit easier too. So, my guess
is that modifying the UI should be possible.

Now, to the actual questions;

- I think modifying UI should be doable, but how about actually adding new
  tags to DOM? I'd need both block-level and inline tags, although the only
  thing Mozilla internals (Gecko?) would need to know would be whether it's
  a block or inline tag and which effects to apply. Latter could also be done
  by just adding style definitions at HTML-level if necessary.
- Is it possible to just add "unknown" tags, so that even though editor/Gecko
  don't recognize tags, they are still stored and output? If so, I might not
  need to modify DOM code at all?
- Even more; I could just use <span> and <div>, but either define new attributes
  to store information (used by actual XML-tools content mgmt system has),
  or reuse one or more of existing ones (overriding class or name would be an ugly hack
  though). Similar to question about unknown tags; how does editor handle unknown
  attributes? If it just stores them and outputs normally, that would be enough for
  me. Actual rendering could be defined by using style attributes... This would
  likely be the minimal change to the editor, to get the functionality.
- I read the articles linked to from mozilla.org/editor page; some were useful,
  but of course there's never too much documentation. :-)
  Are there other places I should look for additional docs (in addition to the
  source code) about extending the editor? (or perhaps about using XUL etc)

Once again, thanks in advance for any hints and insight you can give,

-+ Tatu +-

Reply via email to