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

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -