We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21872
    • 95 Posts
    I need to re-initialize the editor with Javascript, preferably jQuery flavored, after moving it around the DOM. I’m really unclear on how I would accomplish this. Can anyone help?


    A little background for those who require it:

    I’m trying to find a sane way to move an instance of TinyMCE that is generated as a TV. So far I’ve tried jquery and generic js, but detaching the iframe or any node containing it from the DOM causes the browser to lose the contents of the iframe. I’ve tried rewriting the underlying markup to remove the tables, but that is more challenging than it looks with all the PHP in there. And it wouldn’t really be sufficient. It would help, but only if the editor were always to occur in the same place, which I don’t want to rely on since someone could change the order of the TVs. I want this to be reusable, so writing an ID into the script isn’t my first choice.

    What I’d like to do is go back to my original approach and rewrite the markup on the fly then restart the editor.