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