2 * $RCSfile: editor_plugin_src.js,v $
\r
4 * $Date: 2006/05/03 10:46:42 $
\r
7 * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
\r
10 /* Import plugin specific language pack */
\r
11 tinyMCE.importPluginLanguagePack('style', 'en');
\r
13 var TinyMCE_StylePlugin = {
\r
14 getInfo : function() {
\r
17 author : 'Moxiecode Systems',
\r
18 authorurl : 'http://tinymce.moxiecode.com',
\r
19 infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_style.html',
\r
20 version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
\r
24 getControlHTML : function(cn) {
\r
27 return tinyMCE.getButtonHTML(cn, 'lang_style_styleinfo_desc', '{$pluginurl}/images/style_info.gif', 'mceStyleProps', true);
\r
33 execCommand : function(editor_id, element, command, user_interface, value) {
\r
38 case "mceStyleProps":
\r
39 TinyMCE_StylePlugin._styleProps();
\r
42 case "mceSetElementStyle":
\r
43 inst = tinyMCE.getInstanceById(editor_id);
\r
44 e = inst.selection.getFocusElement();
\r
47 e.style.cssText = value;
\r
54 // Pass to next handler in chain
\r
58 handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
\r
61 // Private plugin specific methods
\r
63 _styleProps : function() {
\r
64 var e = tinyMCE.selectedInstance.selection.getFocusElement();
\r
69 tinyMCE.openWindow({
\r
70 file : '../../plugins/style/props.htm',
\r
71 width : 480 + tinyMCE.getLang('lang_style_props_delta_width', 0),
\r
72 height : 320 + tinyMCE.getLang('lang_style_props_delta_height', 0)
\r
74 editor_id : tinyMCE.selectedInstance.editorId,
\r
76 style_text : e.style.cssText
\r
81 tinyMCE.addPlugin("style", TinyMCE_StylePlugin);
\r