diff options
| author | hukl <contact@smyck.org> | 2009-02-17 21:54:39 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-02-17 21:54:39 +0100 |
| commit | f61b5b0597e0c25f084ee67d402f12a43a7a9947 (patch) | |
| tree | 3b4c3f9f38637f1a7ecf703ece4fd3bc4c6e2934 /public/javascripts/tiny_mce/plugins/nonbreaking | |
| parent | 3d3b786cc43266f6292f5edd25733dbb9bd6ed06 (diff) | |
added tinymce editor for body area of pages
Diffstat (limited to 'public/javascripts/tiny_mce/plugins/nonbreaking')
| -rwxr-xr-x | public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin.js | 1 | ||||
| -rwxr-xr-x | public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js | 50 |
2 files changed, 51 insertions, 0 deletions
diff --git a/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin.js b/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin.js new file mode 100755 index 0000000..4fce503 --- /dev/null +++ b/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin.js | |||
| @@ -0,0 +1 @@ | |||
| (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">·</span>':' ');});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/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js new file mode 100755 index 0000000..b723756 --- /dev/null +++ b/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | tinymce.create('tinymce.plugins.Nonbreaking', { | ||
| 10 | init : function(ed, url) { | ||
| 11 | var t = this; | ||
| 12 | |||
| 13 | t.editor = ed; | ||
| 14 | |||
| 15 | // Register commands | ||
| 16 | ed.addCommand('mceNonBreaking', function() { | ||
| 17 | ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? '<span class="mceItemHidden mceVisualNbsp">·</span>' : ' '); | ||
| 18 | }); | ||
| 19 | |||
| 20 | // Register buttons | ||
| 21 | ed.addButton('nonbreaking', {title : 'nonbreaking.nonbreaking_desc', cmd : 'mceNonBreaking'}); | ||
| 22 | |||
| 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); | ||
| 30 | } | ||
| 31 | }); | ||
| 32 | } | ||
| 33 | }, | ||
| 34 | |||
| 35 | getInfo : function() { | ||
| 36 | return { | ||
| 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 | ||
| 42 | }; | ||
| 43 | } | ||
| 44 | |||
| 45 | // Private methods | ||
| 46 | }); | ||
| 47 | |||
| 48 | // Register plugin | ||
| 49 | tinymce.PluginManager.add('nonbreaking', tinymce.plugins.Nonbreaking); | ||
| 50 | })(); \ No newline at end of file | ||
