Mercurial > public > sg101
comparison static/js/tiny_mce/plugins/nonbreaking/editor_plugin_src.js @ 312:88b2b9cb8c1f
Fixing #142; cut over to the django.contrib.staticfiles app.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 27 Jan 2011 02:56:10 +0000 |
parents | |
children | 6c182ceb7147 |
comparison
equal
deleted
inserted
replaced
311:b1c39788e511 | 312:88b2b9cb8c1f |
---|---|
1 /** | |
2 * editor_plugin_src.js | |
3 * | |
4 * Copyright 2009, Moxiecode Systems AB | |
5 * Released under LGPL License. | |
6 * | |
7 * License: http://tinymce.moxiecode.com/license | |
8 * Contributing: http://tinymce.moxiecode.com/contributing | |
9 */ | |
10 | |
11 (function() { | |
12 tinymce.create('tinymce.plugins.Nonbreaking', { | |
13 init : function(ed, url) { | |
14 var t = this; | |
15 | |
16 t.editor = ed; | |
17 | |
18 // Register commands | |
19 ed.addCommand('mceNonBreaking', function() { | |
20 ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? '<span _mce_bogus="1" class="mceItemHidden mceItemNbsp"> </span>' : ' '); | |
21 }); | |
22 | |
23 // Register buttons | |
24 ed.addButton('nonbreaking', {title : 'nonbreaking.nonbreaking_desc', cmd : 'mceNonBreaking'}); | |
25 | |
26 if (ed.getParam('nonbreaking_force_tab')) { | |
27 ed.onKeyDown.add(function(ed, e) { | |
28 if (tinymce.isIE && e.keyCode == 9) { | |
29 ed.execCommand('mceNonBreaking'); | |
30 ed.execCommand('mceNonBreaking'); | |
31 ed.execCommand('mceNonBreaking'); | |
32 tinymce.dom.Event.cancel(e); | |
33 } | |
34 }); | |
35 } | |
36 }, | |
37 | |
38 getInfo : function() { | |
39 return { | |
40 longname : 'Nonbreaking space', | |
41 author : 'Moxiecode Systems AB', | |
42 authorurl : 'http://tinymce.moxiecode.com', | |
43 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking', | |
44 version : tinymce.majorVersion + "." + tinymce.minorVersion | |
45 }; | |
46 } | |
47 | |
48 // Private methods | |
49 }); | |
50 | |
51 // Register plugin | |
52 tinymce.PluginManager.add('nonbreaking', tinymce.plugins.Nonbreaking); | |
53 })(); |