2 * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
\r
5 * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
\r
9 tinymce.create('tinymce.plugins.Nonbreaking', {
\r
10 init : function(ed, url) {
\r
15 // Register commands
\r
16 ed.addCommand('mceNonBreaking', function() {
\r
17 ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? '<span class="mceItemHidden mceVisualNbsp">·</span>' : ' ');
\r
21 ed.addButton('nonbreaking', {title : 'nonbreaking.nonbreaking_desc', cmd : 'mceNonBreaking'});
\r
23 if (ed.getParam('nonbreaking_force_tab')) {
\r
24 ed.onKeyDown.add(function(ed, e) {
\r
25 if (tinymce.isIE && e.keyCode == 9) {
\r
26 ed.execCommand('mceNonBreaking');
\r
27 ed.execCommand('mceNonBreaking');
\r
28 ed.execCommand('mceNonBreaking');
\r
29 tinymce.dom.Event.cancel(e);
\r
35 getInfo : function() {
\r
37 longname : 'Nonbreaking space',
\r
38 author : 'Moxiecode Systems AB',
\r
39 authorurl : 'http://tinymce.moxiecode.com',
\r
40 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking',
\r
41 version : tinymce.majorVersion + "." + tinymce.minorVersion
\r
49 tinymce.PluginManager.add('nonbreaking', tinymce.plugins.Nonbreaking);
\r