includes/clientside/tinymce/plugins/nonbreaking/editor_plugin_src.js
changeset 395 fa4c5ecb7c9a
parent 335 67bd3121a12e
equal deleted inserted replaced
394:fbfdcea634a7 395:fa4c5ecb7c9a
     1 /**
     1 /**
     2  * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
     2  * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
     3  *
     3  *
     4  * @author Moxiecode
     4  * @author Moxiecode
     5  * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
     5  * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
     6  */
     6  */
     7 
     7 
     8 (function() {
     8 (function() {
     9 	tinymce.create('tinymce.plugins.Nonbreaking', {
     9 	tinymce.create('tinymce.plugins.Nonbreaking', {
    10 		init : function(ed, url) {
    10 		init : function(ed, url) {
    12 
    12 
    13 			t.editor = ed;
    13 			t.editor = ed;
    14 
    14 
    15 			// Register commands
    15 			// Register commands
    16 			ed.addCommand('mceNonBreaking', function() {
    16 			ed.addCommand('mceNonBreaking', function() {
    17 				ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? '<span class="mceItemHiddenVisualChar">&middot;</span>' : '&nbsp;');
    17 				ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? '<span class="mceItemHidden mceVisualNbsp">&middot;</span>' : '&nbsp;');
    18 			});
    18 			});
    19 
    19 
    20 			// Register buttons
    20 			// Register buttons
    21 			ed.addButton('nonbreaking', {title : 'nonbreaking.nonbreaking_desc', cmd : 'mceNonBreaking'});
    21 			ed.addButton('nonbreaking', {title : 'nonbreaking.nonbreaking_desc', cmd : 'mceNonBreaking'});
    22 
    22