aboutsummaryrefslogtreecommitdiffstats
path: root/library/tinymce/jscripts/tiny_mce/plugins/nonbreaking
diff options
context:
space:
mode:
Diffstat (limited to 'library/tinymce/jscripts/tiny_mce/plugins/nonbreaking')
-rw-r--r--[-rwxr-xr-x]library/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin.js2
-rw-r--r--[-rwxr-xr-x]library/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js7
2 files changed, 5 insertions, 4 deletions
diff --git a/library/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin.js b/library/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin.js
index f2dbbff2b..687f54866 100755..100644
--- a/library/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin.js
+++ b/library/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin.js
@@ -1 +1 @@
-(function(){tinymce.create("tinymce.plugins.Nonbreaking",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceNonBreaking",function(){a.execCommand("mceInsertContent",false,(a.plugins.visualchars&&a.plugins.visualchars.state)?'<span class="mceItemHidden mceVisualNbsp">&middot;</span>':"&nbsp;")});a.addButton("nonbreaking",{title:"nonbreaking.nonbreaking_desc",cmd:"mceNonBreaking"});if(a.getParam("nonbreaking_force_tab")){a.onKeyDown.add(function(d,f){if(tinymce.isIE&&f.keyCode==9){d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking");tinymce.dom.Event.cancel(f)}})}},getInfo:function(){return{longname:"Nonbreaking space",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("nonbreaking",tinymce.plugins.Nonbreaking)})(); \ No newline at end of file
+(function(){tinymce.create("tinymce.plugins.Nonbreaking",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceNonBreaking",function(){a.execCommand("mceInsertContent",false,(a.plugins.visualchars&&a.plugins.visualchars.state)?'<span data-mce-bogus="1" class="mceItemHidden mceItemNbsp">&nbsp;</span>':"&nbsp;")});a.addButton("nonbreaking",{title:"nonbreaking.nonbreaking_desc",cmd:"mceNonBreaking"});if(a.getParam("nonbreaking_force_tab")){a.onKeyDown.add(function(d,f){if(f.keyCode==9){f.preventDefault();d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking")}})}},getInfo:function(){return{longname:"Nonbreaking space",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("nonbreaking",tinymce.plugins.Nonbreaking)})(); \ No newline at end of file
diff --git a/library/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js
index e3b078bfa..d492fbefe 100755..100644
--- a/library/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js
+++ b/library/tinymce/jscripts/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) ? '<span class="mceItemHidden mceVisualNbsp">&middot;</span>' : '&nbsp;');
+ ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? '<span data-mce-bogus="1" class="mceItemHidden mceItemNbsp">&nbsp;</span>' : '&nbsp;');
});
// 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);
}
});
}