X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=webcit%2Ftiny_mce%2Fplugins%2Fnoneditable%2Feditor_plugin_src.js;h=916dce29cfc37bd755c724d36cb5f9ffa5fbfd83;hp=656c971b8cee3921dc7e5e0fd240353be677e6f9;hb=b05f4eef4014db3885787ef15107cba93c932ac9;hpb=b347fec899815ec89b2738a0877880ee81e74b59 diff --git a/webcit/tiny_mce/plugins/noneditable/editor_plugin_src.js b/webcit/tiny_mce/plugins/noneditable/editor_plugin_src.js index 656c971b8..916dce29c 100644 --- a/webcit/tiny_mce/plugins/noneditable/editor_plugin_src.js +++ b/webcit/tiny_mce/plugins/noneditable/editor_plugin_src.js @@ -13,7 +13,7 @@ tinymce.create('tinymce.plugins.NonEditablePlugin', { init : function(ed, url) { - var t = this, editClass, nonEditClass; + var t = this, editClass, nonEditClass, state; t.editor = ed; editClass = ed.getParam("noneditable_editable_class", "mceEditable"); @@ -33,10 +33,13 @@ // Block or unblock if (sc || ec) { + state = 1; t._setDisabled(1); return false; - } else + } else if (state == 1) { t._setDisabled(0); + state = 0; + } }); }, @@ -73,11 +76,13 @@ ed.onKeyPress.addToTop(t._block); ed.onKeyUp.addToTop(t._block); ed.onPaste.addToTop(t._block); + ed.onContextMenu.addToTop(t._block); } else { ed.onKeyDown.remove(t._block); ed.onKeyPress.remove(t._block); ed.onKeyUp.remove(t._block); ed.onPaste.remove(t._block); + ed.onContextMenu.remove(t._block); } t.disabled = s;