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