I would like to use TinyMCE as kind of JavaDoc editor. JavaDoc is not XHTML but you can have content like this:
This is my class description
<p>
After paragraph, there is more detailed description...
<p>
At the end come some javadoc attributes
@since ....
This is valid Javadoc which I would like to edit via TinyMCE.
Passing it through TinyMCE, making modification or not and then calling getContent(), it will return something like this (i.e. valid XHTML):
<p>This is my class description</p>
<p>After paragraph, there is more detailed description...</p>
<p>At the end come some javadoc attributes</p>
<p> </p>
<p>@since ....</p>
I would like the output to be as stable as possible when i feed it back into our Javadoc. What is the best approach to achieve it? Are there some hocks/ways in tinyMCE itself to modify the DOM before exporting via getContent()? Or do is my best option to just take the output of TinyMCE as is and then use some custom code to convert the top-level XHTML paragraph tags back to like before myself?
I understand that it will be hard to get a 100% solution out of this, but if it works 95% in code way that is sufficient as it only is an internal tool.