I am updating a tinymce editor instance from within my javascript code like this:
tinyMCE.setContent(this.datems.Content);
where this.datems.Content contains html code such as: <h1>Some Header</h1>.
When I test this within an untouched copy of tinymce outside of the silverstripe cms I have no problems. It translates over beautifully. But when I run this within the silverstripe cms I get jumpled messes: primarily that it encodes my brackets so that I see the source code in the wysiwyg view. When I view the source of it I see something like <p>&lt;h1&gt;Some Text&lt;/h1. Obviously the html is being rewritten.
So I took the plunge into the tiny_mce javascript and found the _setHTML method that silverstripe uses to intercept the setContent and updateContent methods. Within this method your all kinds of things are being rewritten.
My question is is what does _setHTML expect so that my code comes unscathed out the other side (ie: not having all the bracket characters of my HTML tags all construed).
cheers,
davis