Reputation: 27003
Like the question says has anyone been able to take a OpenWYSIWYG control and change its contents dynamically with JavaScript? It's hard because it takes your textarea and transforms it into a WYSIWYG editor by making the textarea invisible and inserting some kind of iframe and uses that as the editor.
I've tried code like this but failed:
document.getElementById("textarea-wysiwyg").value = "BLARG";
Upvotes: 2
Views: 746
Reputation: 21183
If you know that is it the only frame on the page then you can do something like this:
window.frames[0].document.body.innerHTML = 'blarg'
The above works when I tried it on http://www.openwebware.com/wysiwyg/demo.shtml in firebug.
Hope this helps...
Upvotes: 1