How can I toggle the readonly
state in an initialized tinyMCE container?
Whilst the tinyMCE is initialised in a common javascript file, the option I want to change is specific to the logic of an individual page, and changes based on user's input via a checkbox.
This are some of the things I tried and all resulted in failure: http://pastebin.com/JEn2fyE6
I just managed to do it this way:
Having the textarea
set with id intro
I do this
if($('.disabled_check').is(':checked')) {
$('#intro_ifr').contents().find('body').attr('contenteditable', false);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With