comparison media/js/tiny_mce/plugins/advhr/editor_plugin_src.js @ 45:a5b4c5ce0658

Breaking down and controlling all media files, including javascript libraries.
author Brian Neal <bgneal@gmail.com>
date Fri, 19 Jun 2009 03:16:03 +0000
parents
children 149c3567fec1
comparison
equal deleted inserted replaced
44:08cd19c1ee50 45:a5b4c5ce0658
1 /**
2 * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z 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.AdvancedHRPlugin', {
10 init : function(ed, url) {
11 // Register commands
12 ed.addCommand('mceAdvancedHr', function() {
13 ed.windowManager.open({
14 file : url + '/rule.htm',
15 width : 250 + parseInt(ed.getLang('advhr.delta_width', 0)),
16 height : 160 + parseInt(ed.getLang('advhr.delta_height', 0)),
17 inline : 1
18 }, {
19 plugin_url : url
20 });
21 });
22
23 // Register buttons
24 ed.addButton('advhr', {
25 title : 'advhr.advhr_desc',
26 cmd : 'mceAdvancedHr'
27 });
28
29 ed.onNodeChange.add(function(ed, cm, n) {
30 cm.setActive('advhr', n.nodeName == 'HR');
31 });
32
33 ed.onClick.add(function(ed, e) {
34 e = e.target;
35
36 if (e.nodeName === 'HR')
37 ed.selection.select(e);
38 });
39 },
40
41 getInfo : function() {
42 return {
43 longname : 'Advanced HR',
44 author : 'Moxiecode Systems AB',
45 authorurl : 'http://tinymce.moxiecode.com',
46 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr',
47 version : tinymce.majorVersion + "." + tinymce.minorVersion
48 };
49 }
50 });
51
52 // Register plugin
53 tinymce.PluginManager.add('advhr', tinymce.plugins.AdvancedHRPlugin);
54 })();