summaryrefslogtreecommitdiff
path: root/program/js/tiny_mce/plugins/nonbreaking
diff options
context:
space:
mode:
Diffstat (limited to 'program/js/tiny_mce/plugins/nonbreaking')
-rw-r--r--program/js/tiny_mce/plugins/nonbreaking/editor_plugin.js2
-rw-r--r--program/js/tiny_mce/plugins/nonbreaking/editor_plugin_src.js96
-rw-r--r--program/js/tiny_mce/plugins/nonbreaking/images/nonbreaking.gifbin619 -> 0 bytes
-rw-r--r--program/js/tiny_mce/plugins/nonbreaking/langs/en.js5
4 files changed, 43 insertions, 60 deletions
diff --git a/program/js/tiny_mce/plugins/nonbreaking/editor_plugin.js b/program/js/tiny_mce/plugins/nonbreaking/editor_plugin.js
index 5b1279720..4fce503c1 100644
--- a/program/js/tiny_mce/plugins/nonbreaking/editor_plugin.js
+++ b/program/js/tiny_mce/plugins/nonbreaking/editor_plugin.js
@@ -1 +1 @@
-tinyMCE.importPluginLanguagePack('nonbreaking');var TinyMCE_NonBreakingPlugin={getInfo:function(){return{longname:'Nonbreaking space',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},getControlHTML:function(cn){switch(cn){case"nonbreaking":return tinyMCE.getButtonHTML(cn,'lang_nonbreaking_desc','{$pluginurl}/images/nonbreaking.gif','mceNonBreaking',false)}return""},execCommand:function(editor_id,element,command,user_interface,value){var inst=tinyMCE.getInstanceById(editor_id),h;switch(command){case"mceNonBreaking":h=(inst.visualChars&&inst.visualChars.state)?'<span class="mceItemHiddenVisualChar">&middot;</span>':'&nbsp;';tinyMCE.execInstanceCommand(editor_id,'mceInsertContent',false,h);return true}return false},handleEvent:function(e){var inst,h;if(!tinyMCE.isOpera&&e.type=='keydown'&&e.keyCode==9&&tinyMCE.getParam('nonbreaking_force_tab',false)){inst=tinyMCE.selectedInstance;h=(inst.visualChars&&inst.visualChars.state)?'<span class="mceItemHiddenVisualChar">&middot;&middot;&middot;</span>':'&nbsp;&nbsp;&nbsp;';tinyMCE.execInstanceCommand(inst.editorId,'mceInsertContent',false,h);tinyMCE.cancelEvent(e);return false}return true}};tinyMCE.addPlugin("nonbreaking",TinyMCE_NonBreakingPlugin); \ No newline at end of file
+(function(){tinymce.create('tinymce.plugins.Nonbreaking',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceNonBreaking',function(){ed.execCommand('mceInsertContent',false,(ed.plugins.visualchars&&ed.plugins.visualchars.state)?'<span class="mceItemHidden mceVisualNbsp">&middot;</span>':'&nbsp;');});ed.addButton('nonbreaking',{title:'nonbreaking.nonbreaking_desc',cmd:'mceNonBreaking'});if(ed.getParam('nonbreaking_force_tab')){ed.onKeyDown.add(function(ed,e){if(tinymce.isIE&&e.keyCode==9){ed.execCommand('mceNonBreaking');ed.execCommand('mceNonBreaking');ed.execCommand('mceNonBreaking');tinymce.dom.Event.cancel(e);}});}},getInfo:function(){return{longname:'Nonbreaking space',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('nonbreaking',tinymce.plugins.Nonbreaking);})(); \ No newline at end of file
diff --git a/program/js/tiny_mce/plugins/nonbreaking/editor_plugin_src.js b/program/js/tiny_mce/plugins/nonbreaking/editor_plugin_src.js
index 73d547855..b72375660 100644
--- a/program/js/tiny_mce/plugins/nonbreaking/editor_plugin_src.js
+++ b/program/js/tiny_mce/plugins/nonbreaking/editor_plugin_src.js
@@ -1,62 +1,50 @@
/**
- * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
+ * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
*
* @author Moxiecode
- * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
+ * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
*/
-/* Import plugin specific language pack */
-tinyMCE.importPluginLanguagePack('nonbreaking');
-
-var TinyMCE_NonBreakingPlugin = {
- getInfo : function() {
- return {
- longname : 'Nonbreaking space',
- author : 'Moxiecode Systems AB',
- authorurl : 'http://tinymce.moxiecode.com',
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking',
- version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
- };
- },
-
- getControlHTML : function(cn) {
- switch (cn) {
- case "nonbreaking":
- return tinyMCE.getButtonHTML(cn, 'lang_nonbreaking_desc', '{$pluginurl}/images/nonbreaking.gif', 'mceNonBreaking', false);
+(function() {
+ tinymce.create('tinymce.plugins.Nonbreaking', {
+ init : function(ed, url) {
+ var t = this;
+
+ t.editor = ed;
+
+ // Register commands
+ ed.addCommand('mceNonBreaking', function() {
+ ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? '<span class="mceItemHidden mceVisualNbsp">&middot;</span>' : '&nbsp;');
+ });
+
+ // Register buttons
+ ed.addButton('nonbreaking', {title : 'nonbreaking.nonbreaking_desc', cmd : 'mceNonBreaking'});
+
+ if (ed.getParam('nonbreaking_force_tab')) {
+ ed.onKeyDown.add(function(ed, e) {
+ if (tinymce.isIE && e.keyCode == 9) {
+ ed.execCommand('mceNonBreaking');
+ ed.execCommand('mceNonBreaking');
+ ed.execCommand('mceNonBreaking');
+ tinymce.dom.Event.cancel(e);
+ }
+ });
+ }
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Nonbreaking space',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
}
- return "";
- },
+ // Private methods
+ });
-
- execCommand : function(editor_id, element, command, user_interface, value) {
- var inst = tinyMCE.getInstanceById(editor_id), h;
-
- switch (command) {
- case "mceNonBreaking":
- h = (inst.visualChars && inst.visualChars.state) ? '<span class="mceItemHiddenVisualChar">&middot;</span>' : '&nbsp;';
- tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false, h);
- return true;
- }
-
- return false;
- },
-
- handleEvent : function(e) {
- var inst, h;
-
- if (!tinyMCE.isOpera && e.type == 'keydown' && e.keyCode == 9 && tinyMCE.getParam('nonbreaking_force_tab', false)) {
- inst = tinyMCE.selectedInstance;
-
- h = (inst.visualChars && inst.visualChars.state) ? '<span class="mceItemHiddenVisualChar">&middot;&middot;&middot;</span>' : '&nbsp;&nbsp;&nbsp;';
- tinyMCE.execInstanceCommand(inst.editorId, 'mceInsertContent', false, h);
-
- tinyMCE.cancelEvent(e);
- return false;
- }
-
- return true;
- }
-};
-
-tinyMCE.addPlugin("nonbreaking", TinyMCE_NonBreakingPlugin);
+ // Register plugin
+ tinymce.PluginManager.add('nonbreaking', tinymce.plugins.Nonbreaking);
+})(); \ No newline at end of file
diff --git a/program/js/tiny_mce/plugins/nonbreaking/images/nonbreaking.gif b/program/js/tiny_mce/plugins/nonbreaking/images/nonbreaking.gif
deleted file mode 100644
index a731fc91a..000000000
--- a/program/js/tiny_mce/plugins/nonbreaking/images/nonbreaking.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/plugins/nonbreaking/langs/en.js b/program/js/tiny_mce/plugins/nonbreaking/langs/en.js
deleted file mode 100644
index fd49a646c..000000000
--- a/program/js/tiny_mce/plugins/nonbreaking/langs/en.js
+++ /dev/null
@@ -1,5 +0,0 @@
-// UK lang variables
-
-tinyMCE.addToLang('nonbreaking',{
-desc : 'Insert non-breaking space character'
-});