You are not logged in.

Dear visitor, welcome to If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.


Wednesday, November 16th 2011, 6:00pm

WYSIWYG XML editor: using Webkit or not?


I have plans to write a WYSIWYG XML (not HTML) editor. An XML element can be standing for one or more HTML elements. I seem to have 2 options: either render everything myself. Which gives me complete control over everything, but also might mean I have to reinvent quite some wheels, especially since I want to support "floats" identical to HTML. Or I could use Webkit: keep a "cursor" in the XML tree, modify the tree based on key presses and update the HTML (partially) that Webkit shows, and use, for example, a span element to mimic a cursor. One problem that springs to my mind is how to move the cursor up/down (i.e. vertical motion), where to insert the cursor. I am aware that Webkit supports contentEditable but what I've read about it so far is that it does too much; I don't want the ability to delete arbitrary (generated) HTML elements, or the insertion of HTML elements I have no control over. Also, I need to know the location in the XML tree in order to modify it. Or: if I move the cursor up, I must know where I am in the XML tree.

Any advice?


Similar threads

Used tags

editor WYSIWYG, webkit, XML