[jdom-interest] WYSIWYG text+img editor

Kevin Chiu kevin.gc+jdom at gmail.com
Thu Sep 8 07:33:35 PDT 2005

Hello JDom list,

I'm trying to decide between two different XML models for a WYSIWYG
editor that needs to support both images and text.

The first XML model is as follows:

1. Each character has it's own <TEXT> tag.
2. Each image has it's own <JPG> or <SVG> etc. tag

Deleting or inserting img's or text would be equivalent to deleting or
adding children at a given index of the root node.

The second XML model is as follows:
1. Each continuous group of text has a shared <TEXT> tag.
2. Each continuous group of images has it's own <IMG> tag 9jpg, svg etc.).

I wouldn't know how to delete or insert characters or images...

So, the second model seems more efficient, cleaner, and simpler, but I
can't figure out how to make editing work with it. The the first model
seems doable, but it also seems overly complicated and messy.

Maybe there is a standard model for WYSIWYG XML-based editors and I'm
just missing it?

Any Suggestions?
Kevin Chiu

More information about the jdom-interest mailing list