4 * Copyright 2009, Moxiecode Systems AB
5 * Released under LGPL License.
7 * License: http://tinymce.moxiecode.com/license
8 * Contributing: http://tinymce.moxiecode.com/contributing
12 tinymce.create('tinymce.plugins.AdvancedHRPlugin', {
13 init : function(ed, url) {
15 ed.addCommand('mceAdvancedHr', function() {
16 ed.windowManager.open({
17 file : url + '/rule.htm',
18 width : 250 + parseInt(ed.getLang('advhr.delta_width', 0)),
19 height : 160 + parseInt(ed.getLang('advhr.delta_height', 0)),
27 ed.addButton('advhr', {
28 title : 'advhr.advhr_desc',
32 ed.onNodeChange.add(function(ed, cm, n) {
33 cm.setActive('advhr', n.nodeName == 'HR');
36 ed.onClick.add(function(ed, e) {
39 if (e.nodeName === 'HR')
40 ed.selection.select(e);
44 getInfo : function() {
46 longname : 'Advanced HR',
47 author : 'Moxiecode Systems AB',
48 authorurl : 'http://tinymce.moxiecode.com',
49 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr',
50 version : tinymce.majorVersion + "." + tinymce.minorVersion
56 tinymce.PluginManager.add('advhr', tinymce.plugins.AdvancedHRPlugin);