Removing jQuery and creating cheez la weez to work in TinyMCE version 4. Use this in the plugin, in the initialization code, or simply on your page after creating the editor instance
// var editor = your tinyMCE editor instance (eg tinymce.activeEditor) editor.on('mousedown', function(e) { var element = e.target, body = editor.dom.doc.body; if (editor.dom.hasClass( element, 'your-class')) { editor.dom.setAttrib(body,'contenteditable',false); } else { editor.dom.setAttrib(body,'contenteditable',true); } });
The only bad bit is that your user will have to go back to the editor to resume editing (the arrow keys will not work)
source share