I have a quick question about tinyMCE . I have textarea, with id="mainbuffer" and the tinyMCE.get(id).setContent(data) function.
ONLY works when it is called onclick="function()" from the link and does not work when the page loads. In my case, this is: tinyMCE.get('mainbuffer').setContent( localStorage.getItem('mainbuffer') );
I tried tinyMCE.execCommand() , but this does not work either.
I want the JavaScript function to initialize the text field with the data stored in localStorage, which I checked, works fine. Any suggestions?
source share