2 * $Id: editor_plugin_src.js 126 2006-10-22 16:19:55Z spocke $
\r
5 * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
\r
8 /* Import plugin specific language pack */
\r
9 tinyMCE.importPluginLanguagePack('style');
\r
11 var TinyMCE_StylePlugin = {
\r
12 getInfo : function() {
\r
15 author : 'Moxiecode Systems AB',
\r
16 authorurl : 'http://tinymce.moxiecode.com',
\r
17 infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_style.html',
\r
18 version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
\r
22 getControlHTML : function(cn) {
\r
25 return tinyMCE.getButtonHTML(cn, 'lang_style_styleinfo_desc', '{$pluginurl}/images/styleprops.gif', 'mceStyleProps', true);
\r
31 execCommand : function(editor_id, element, command, user_interface, value) {
\r
36 case "mceStyleProps":
\r
37 TinyMCE_StylePlugin._styleProps();
\r
40 case "mceSetElementStyle":
\r
41 inst = tinyMCE.getInstanceById(editor_id);
\r
42 e = inst.selection.getFocusElement();
\r
45 e.style.cssText = value;
\r
52 // Pass to next handler in chain
\r
56 handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
\r
59 // Private plugin specific methods
\r
61 _styleProps : function() {
\r
62 var e = tinyMCE.selectedInstance.selection.getFocusElement();
\r
67 tinyMCE.openWindow({
\r
68 file : '../../plugins/style/props.htm',
\r
69 width : 480 + tinyMCE.getLang('lang_style_props_delta_width', 0),
\r
70 height : 320 + tinyMCE.getLang('lang_style_props_delta_height', 0)
\r
72 editor_id : tinyMCE.selectedInstance.editorId,
\r
74 style_text : e.style.cssText
\r
79 tinyMCE.addPlugin("style", TinyMCE_StylePlugin);
\r