Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EditorKit with xml as model  RSS feed

 
Mathias Nilsson
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have some questions in how to create an editorkit and have an xml document as the model.
I have used HTMLEditorKit before and parsed the generated html in a wysiwyg editor to text or xml ( this is later used in creating indesign document and other documents )

Can anyone point me to the right direction in how to use an xml document as the model and have more control over it so that I don't have to
transform the html to my required data. I would like to have it done right away in the editor.
 
Brian Cole
Author
Ranch Hand
Posts: 935
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mathias Nilsson wrote:

I have some questions in how to create an editorkit and have an xml document as the model.
I have used HTMLEditorKit before and parsed the generated html in a wysiwyg editor to text or xml ( this is later used in creating indesign document and other documents )


You haven't said what you want the kit to do with the xml. Do you want it interpreted as something (XHTML, say) and shown WYSIWYG, or do you want it just to appear as text and muck with indentation and such. Please explain.
 
Mathias Nilsson
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to show it to the user as wysiwyg. If the user inserts a list then I would like to show bullits with indent but the model may look something like this.

<paragraph>
<list>
<list-item>Some text<c-style color="red">alert</c-style></list-item>
</list>
</paragraph>

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!