tinymce - how to create an element inside a tiny mce editor? -
I want to create a node like paragraphs, H1, H2 etc. inside a small MCE editor. No reference was found in the document. :( I have tried the following code. It works right in FF but not in IE. Please help.
tinyMCE.activeEditor.selection.setNode (tinyMCE.activeEditor.dom. Create ('p', {Id: 'paraId'}, 'new paragraph created');
thanks
You should make a new element on the iframes document. Also try using different HTML tags to check that there is a problem inserting small P-tags. Or not.
(Document.getElementById ("iframe_id") contentWindow) {var new_elem = document.createElement ("span"); new_elem.id = 'paraId'; tinyMCE.activeEditor.selection.setNode (new_elem);} < / Code>
Comments
Post a Comment