X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;ds=sidebyside;f=webcit%2Ftiny_mce%2Fplugins%2Fnonbreaking%2Feditor_plugin_src.js;h=d492fbefe4190c7bed16ef668b7c941403dd7be0;hb=eb5fb3f6c3b3e1d4d3d7ebbb92b8c60d70d13254;hp=ca83ee26e5418216f5eccbb09885521595c3c32a;hpb=51c6986e64a4405c3971acd67be1d3528ab69539;p=citadel.git diff --git a/webcit/tiny_mce/plugins/nonbreaking/editor_plugin_src.js b/webcit/tiny_mce/plugins/nonbreaking/editor_plugin_src.js index ca83ee26e..d492fbefe 100644 --- a/webcit/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +++ b/webcit/tiny_mce/plugins/nonbreaking/editor_plugin_src.js @@ -17,7 +17,7 @@ // Register commands ed.addCommand('mceNonBreaking', function() { - ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? ' ' : ' '); + ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? ' ' : ' '); }); // Register buttons @@ -25,11 +25,12 @@ if (ed.getParam('nonbreaking_force_tab')) { ed.onKeyDown.add(function(ed, e) { - if (tinymce.isIE && e.keyCode == 9) { + if (e.keyCode == 9) { + e.preventDefault(); + ed.execCommand('mceNonBreaking'); ed.execCommand('mceNonBreaking'); ed.execCommand('mceNonBreaking'); - tinymce.dom.Event.cancel(e); } }); }