2 * $Id: editor_plugin_src.js 787 2008-04-10 11:40:57Z spocke $
\r
5 * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
\r
9 tinymce.create('tinymce.plugins.StylePlugin', {
\r
10 init : function(ed, url) {
\r
11 // Register commands
\r
12 ed.addCommand('mceStyleProps', function() {
\r
13 ed.windowManager.open({
\r
14 file : url + '/props.htm',
\r
15 width : 480 + parseInt(ed.getLang('style.delta_width', 0)),
\r
16 height : 320 + parseInt(ed.getLang('style.delta_height', 0)),
\r
20 style_text : ed.selection.getNode().style.cssText
\r
24 ed.addCommand('mceSetElementStyle', function(ui, v) {
\r
25 if (e = ed.selection.getNode()) {
\r
26 ed.dom.setAttrib(e, 'style', v);
\r
27 ed.execCommand('mceRepaint');
\r
31 ed.onNodeChange.add(function(ed, cm, n) {
\r
32 cm.setDisabled('styleprops', n.nodeName === 'BODY');
\r
36 ed.addButton('styleprops', {title : 'style.desc', cmd : 'mceStyleProps'});
\r
39 getInfo : function() {
\r
42 author : 'Moxiecode Systems AB',
\r
43 authorurl : 'http://tinymce.moxiecode.com',
\r
44 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style',
\r
45 version : tinymce.majorVersion + "." + tinymce.minorVersion
\r
51 tinymce.PluginManager.add('style', tinymce.plugins.StylePlugin);
\r