annotate WebContent/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js @ 14:0f64de5fff5a

try to use javax.xml.bind.DatatypeConverter
author casties
date Wed, 21 Mar 2012 16:38:50 +0100
parents 0be9d53a6967
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
1 /**
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
2 * editor_plugin_src.js
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
3 *
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
4 * Copyright 2009, Moxiecode Systems AB
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
5 * Released under LGPL License.
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
6 *
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
7 * License: http://tinymce.moxiecode.com/license
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
8 * Contributing: http://tinymce.moxiecode.com/contributing
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
9 */
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
10
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
11 (function() {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
12 tinymce.create('tinymce.plugins.Nonbreaking', {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
13 init : function(ed, url) {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
14 var t = this;
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
15
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
16 t.editor = ed;
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
17
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
18 // Register commands
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
19 ed.addCommand('mceNonBreaking', function() {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
20 ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? '<span data-mce-bogus="1" class="mceItemHidden mceItemNbsp">&nbsp;</span>' : '&nbsp;');
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
21 });
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
22
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
23 // Register buttons
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
24 ed.addButton('nonbreaking', {title : 'nonbreaking.nonbreaking_desc', cmd : 'mceNonBreaking'});
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
25
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
26 if (ed.getParam('nonbreaking_force_tab')) {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
27 ed.onKeyDown.add(function(ed, e) {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
28 if (e.keyCode == 9) {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
29 e.preventDefault();
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
30
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
31 ed.execCommand('mceNonBreaking');
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
32 ed.execCommand('mceNonBreaking');
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
33 ed.execCommand('mceNonBreaking');
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
34 }
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
35 });
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
36 }
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
37 },
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
38
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
39 getInfo : function() {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
40 return {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
41 longname : 'Nonbreaking space',
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
42 author : 'Moxiecode Systems AB',
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
43 authorurl : 'http://tinymce.moxiecode.com',
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
44 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking',
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
45 version : tinymce.majorVersion + "." + tinymce.minorVersion
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
46 };
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
47 }
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
48
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
49 // Private methods
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
50 });
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
51
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
52 // Register plugin
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
53 tinymce.PluginManager.add('nonbreaking', tinymce.plugins.Nonbreaking);
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
54 })();