after the tinymce.init()
i can toggle the readOnly setting like this:
editor.mode.set("design");
editor.mode.set("readonly");
but how can i toggle the dark theme for the editor and the content?
this will not work:
editor.mode.set.content_css("dark");
editor.mode.set.skin("dark-oxide");
No, it is not possible. All the settings defined in the tinymce.init()
function cannot be changed without reinitialization. However, reinitialization can be done very fast. You will need to perform 4 steps:
getContent()
destroy()
setContent()
to add the content saved on step 1.