views:

75

answers:

1

I can successfully save the characters < and >.

I do this with these options:

entities : """
cleanup : false
verify_html : false

So far no problems.

However, whenever I put anything between that text it gets converted into a tag:

&lt;xxx&gt;

converts to

<xxx></xxx>

How do I stop that?I am trying to enter sample HTML into TinyMCE so I can document some XML. There must be a standard way of doing this I imagine.

A: 

It sounds very much like you're not encoding the < and > characters correctly. TinyMCE is a HTML editor and the content it's editing gets parsed by the browser, so having unescaped < and > in the content is likely to produce unexpected results based on the browser's handling of malformed HTML.

Be aware that depending on how you load the HTML to edit, the browser may decode entities once before it gets to TinyMCE in which case you'd have to doubly encode the entity to get it loaded safely.

Regards,

Adrian Sutton
http://tinymce.ephox.com

ajsutton