4 * Copyright 2009, Moxiecode Systems AB
5 * Released under LGPL License.
7 * License: http://tinymce.moxiecode.com/license
8 * Contributing: http://tinymce.moxiecode.com/contributing
12 tinymce.create('tinymce.plugins.Nonbreaking', {
13 init : function(ed, url) {
19 ed.addCommand('mceNonBreaking', function() {
20 ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? '<span data-mce-bogus="1" class="mceItemHidden mceItemNbsp"> </span>' : ' ');
24 ed.addButton('nonbreaking', {title : 'nonbreaking.nonbreaking_desc', cmd : 'mceNonBreaking'});
26 if (ed.getParam('nonbreaking_force_tab')) {
27 ed.onKeyDown.add(function(ed, e) {
28 if (tinymce.isIE && e.keyCode == 9) {
29 ed.execCommand('mceNonBreaking');
30 ed.execCommand('mceNonBreaking');
31 ed.execCommand('mceNonBreaking');
32 tinymce.dom.Event.cancel(e);
38 getInfo : function() {
40 longname : 'Nonbreaking space',
41 author : 'Moxiecode Systems AB',
42 authorurl : 'http://tinymce.moxiecode.com',
43 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking',
44 version : tinymce.majorVersion + "." + tinymce.minorVersion
52 tinymce.PluginManager.add('nonbreaking', tinymce.plugins.Nonbreaking);