Topic: Readonly mode on off without reload
I have a TinyMCE editor (3.4.5) that I want to switch between readonly and editable modes. The editor typically starts out in editable mode, and I seem able to switch it to readonly mode with the following command:
ed.execCommand("contentReadOnly", false, ed.getElement());
However, once I've done this, I want to then switch back into editable mode in the future. I tried running the following, but of course this does not work:
ed.execCommand("contentReadOnly", true, ed.getElement());
I'm wondering if someone could tell me what I can do to re-enable editable mode on TinyMCE?
I've seen some people suggest that I must destroy the editor and re-initialize it with readonly:false to accomplish this, but this destroy+re-initialize act has caused me a ton of problems elsewhere. Calling tinyMCE.init twice seems to throw security errors and often results in a dead or completely blank and unusable editor.