8
0
tinymce-editor/tinymce/plugins/nonbreaking/plugin.min.js
Marat 2cb9c3aa14 Squashed 'copy_this/modules/bla/bla-tinymce/' content from commit 835609d
git-subtree-dir: copy_this/modules/bla/bla-tinymce
git-subtree-split: 835609d658ef23894653104da64769f67e13f94e
2015-02-23 12:18:22 +01:00

1 zeile
655 B
JavaScript

tinymce.PluginManager.add("nonbreaking",function(a){var b=a.getParam("nonbreaking_force_tab");if(a.addCommand("mceNonBreaking",function(){a.insertContent(a.plugins.visualchars&&a.plugins.visualchars.state?'<span class="mce-nbsp">&nbsp;</span>':"&nbsp;"),a.dom.setAttrib(a.dom.select("span.mce-nbsp"),"data-mce-bogus","1")}),a.addButton("nonbreaking",{title:"Nonbreaking space",cmd:"mceNonBreaking"}),a.addMenuItem("nonbreaking",{text:"Nonbreaking space",cmd:"mceNonBreaking",context:"insert"}),b){var c=+b>1?+b:3;a.on("keydown",function(b){if(9==b.keyCode){if(b.shiftKey)return;b.preventDefault();for(var d=0;c>d;d++)a.execCommand("mceNonBreaking")}})}});