1 /** |
1 /** |
2 * $Id: editor_plugin_src.js 402 2007-11-17 15:48:49Z spocke $ |
2 * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $ |
3 * |
3 * |
4 * @author Moxiecode |
4 * @author Moxiecode |
5 * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved. |
5 * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. |
6 */ |
6 */ |
7 |
7 |
8 (function() { |
8 (function() { |
9 tinymce.create('tinymce.plugins.StylePlugin', { |
9 tinymce.create('tinymce.plugins.StylePlugin', { |
10 init : function(ed, url) { |
10 init : function(ed, url) { |
11 // Register commands |
11 // Register commands |
12 ed.addCommand('mceStyleProps', function() { |
12 ed.addCommand('mceStyleProps', function() { |
13 ed.windowManager.open({ |
13 ed.windowManager.open({ |
14 file : url + '/props.htm', |
14 file : url + '/props.htm', |
15 width : 480 + ed.getLang('style.delta_width', 0), |
15 width : 480 + parseInt(ed.getLang('style.delta_width', 0)), |
16 height : 320 + ed.getLang('style.delta_height', 0), |
16 height : 320 + parseInt(ed.getLang('style.delta_height', 0)), |
17 inline : 1 |
17 inline : 1 |
18 }, { |
18 }, { |
19 plugin_url : url |
19 plugin_url : url, |
|
20 style_text : ed.selection.getNode().style.cssText |
20 }); |
21 }); |
21 }); |
22 }); |
22 |
23 |
23 ed.addCommand('mceSetElementStyle', function(ui, v) { |
24 ed.addCommand('mceSetElementStyle', function(ui, v) { |
24 if (e = ed.selection.getNode()) { |
25 if (e = ed.selection.getNode()) { |