Set TinyMCE Editor Param after Initialized Set TinyMCE Editor Param after Initialized wordpress wordpress

Set TinyMCE Editor Param after Initialized


An easier way to set this is tinyMCE.activeEditor.settings.readonly = true;But the problem here is that the readonly setting affects the way tinymce gets initialized.So setting it after tinymce is initialized won't have a big impact.

What you can do to prevent users from editing content in your editor is to set the contenteditable attribute of the editors iframe body to false:

tinymce.activeEditor.getBody().setAttribute('contenteditable', false);