|
1 // $Id: fckeditor.config.js,v 1.5.2.14 2009/02/16 10:38:28 wwalc Exp $ |
|
2 |
|
3 /* |
|
4 WARNING: clear browser's cache after you modify this file. |
|
5 If you don't do this, you may notice that browser is ignoring all your changes. |
|
6 */ |
|
7 |
|
8 /* |
|
9 Define as many toolbars as you need, you can change toolbar names |
|
10 DrupalBasic will be forced on some smaller textareas (if enabled) |
|
11 if you change the name of DrupalBasic, you have to update |
|
12 FCKEDITOR_FORCE_SIMPLE_TOOLBAR_NAME in fckeditor.module |
|
13 */ |
|
14 |
|
15 //uncomment these three lines to enable teaser break and page break plugins |
|
16 //remember to add 'DrupalBreak' and 'DrupalPageBreak' buttons to the toolbar |
|
17 FCKConfig.PluginsPath = '../../plugins/' ; |
|
18 FCKConfig.Plugins.Add( 'drupalbreak', 'en,pl,ru' ) ; |
|
19 FCKConfig.Plugins.Add( 'imgassist' ) ; |
|
20 //To enable plugins below you should install additional Drupal modules. |
|
21 //Please refer to the README.txt for more instructions. |
|
22 //FCKConfig.Plugins.Add( 'drupalpagebreak', 'en,pl,ru' ) ; |
|
23 //FCKConfig.Plugins.Add( 'linktonode', 'en,pl' ) ; |
|
24 //FCKConfig.Plugins.Add( 'linktomenu', 'en,pl' ) ; |
|
25 |
|
26 /* |
|
27 This toolbar is dedicated to users with "Full HTML" access |
|
28 some of commands used here (like 'FontName') use inline styles, |
|
29 which unfortunately are stripped by "Filtered HTML" filter |
|
30 */ |
|
31 FCKConfig.ToolbarSets["DrupalFull"] = [ |
|
32 ['Source'], |
|
33 ['Cut','Copy','Paste','PasteText','PasteWord'], |
|
34 ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'], |
|
35 ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'], |
|
36 ['OrderedList','UnorderedList','-','Outdent','Indent'], |
|
37 //as of FCKeditor 2.5 you can use also 'Blockquote' button |
|
38 //['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote'], |
|
39 ['JustifyLeft','JustifyCenter','JustifyRight'], |
|
40 /* |
|
41 * EXPERIMENTAL |
|
42 * Uncomment the line below to enable linktonode and linktomenu buttons |
|
43 * ATTENTION: Link to Content module must be installed first! |
|
44 * Remember to load appropriate plugins with FCKConfig.Plugins.Add command a couple of lines above |
|
45 */ |
|
46 //['Link','Unlink','LinkToNode','LinkToMenu','Anchor'], |
|
47 ['Link','Unlink','Anchor'], |
|
48 ['Image','Flash','Table','Rule','SpecialChar','DrupalBreak'], |
|
49 //uncomment this line to enable the page break button |
|
50 //remember to load appropriate plugin with FCKConfig.Plugins.Add command a couple of lines above |
|
51 //['Image','Flash','Table','Rule','SpecialChar','DrupalBreak','DrupalPageBreak'], |
|
52 '/', |
|
53 ['FontFormat','FontName','FontSize'], |
|
54 ['TextColor','BGColor'] |
|
55 ] ; |
|
56 |
|
57 FCKConfig.ToolbarSets["DrupalBasic"] = [ |
|
58 ['FontFormat','-','Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink', 'Image'] |
|
59 ] ; |
|
60 |
|
61 //This toolbar should work fine with "Filtered HTML" filter |
|
62 FCKConfig.ToolbarSets["DrupalFiltered"] = [ |
|
63 ['Source'], |
|
64 ['Cut','Copy','Paste','PasteText','PasteWord'], |
|
65 ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'], |
|
66 /* |
|
67 * EXPERIMENTAL |
|
68 * Uncomment the line below to enable linktonode and linktomenu buttons |
|
69 * ATTENTION: Link to Content module must be installed first! |
|
70 * Remember to load appropriate plugins with FCKConfig.Plugins.Add command a couple of lines above |
|
71 */ |
|
72 //['Link','Unlink','LinkToNode','LinkToMenu','Anchor'], |
|
73 ['Link','Unlink','Anchor'], |
|
74 ['Image','Flash','Table','Rule','Smiley','SpecialChar'], |
|
75 '/', |
|
76 ['FontFormat'], |
|
77 ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'], |
|
78 ['OrderedList','UnorderedList','-','Outdent','Indent'], |
|
79 //as of FCKeditor 2.5 you can use also 'Blockquote' button |
|
80 //['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote'], |
|
81 ['JustifyLeft','JustifyCenter','JustifyRight','DrupalBreak'], |
|
82 //uncomment this line to enable the page break button |
|
83 //remember to load appropriate plugin with FCKConfig.Plugins.Add command a couple of lines above |
|
84 //['JustifyLeft','JustifyCenter','JustifyRight','DrupalBreak','DrupalPageBreak'], |
|
85 ] ; |
|
86 |
|
87 //helper function to add button at the end of the toolbar |
|
88 function addToolbarElement(element, toolbar, pos){ |
|
89 var ts = FCKConfig.ToolbarSets ; |
|
90 if (ts[toolbar]) { |
|
91 var len=ts[toolbar].length; |
|
92 if (pos>=len) pos=len-1; |
|
93 if (ts[toolbar][(len -pos -1)] == '/') pos++; |
|
94 if (pos>=len) pos=len-1; |
|
95 if (!ts[toolbar][(len -pos -1)]) pos++; |
|
96 FCKConfig.ToolbarSets[toolbar][(len -pos -1)].push(element); |
|
97 } |
|
98 } |
|
99 |
|
100 //as of FCKeditor 2.5 ShowBlocks command is available |
|
101 //remove this code if you don't need ShowBlocks buttons |
|
102 if ( FCK.GetData ) { |
|
103 addToolbarElement('ShowBlocks', 'DrupalFiltered', 0); |
|
104 addToolbarElement('ShowBlocks', 'DrupalFull', 0); |
|
105 } |
|
106 |
|
107 // Protect PHP code tags (<?...?>) so FCKeditor will not break them when |
|
108 // switching from Source to WYSIWYG. |
|
109 // Uncommenting this line doesn't mean the user will not be able to type PHP |
|
110 // code in the source. This kind of prevention must be done in the server side |
|
111 // (as does Drupal), so just leave this line as is. |
|
112 FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ; // PHP style server side code |
|
113 |
|
114 var _FileBrowserLanguage = 'php' ; |
|
115 var _QuickUploadLanguage = 'php' ; |
|
116 |
|
117 // This overrides the IndentLength/IndentUnit settings. |
|
118 FCKConfig.IndentClasses = ['rteindent1','rteindent2','rteindent3','rteindent4'] ; |
|
119 |
|
120 // [ Left, Center, Right, Justified ] |
|
121 FCKConfig.JustifyClasses = ['rteleft','rtecenter','rteright','rtejustify'] ; |
|
122 //Set to 'encode' if you want to obfuscate emails with javascript |
|
123 FCKConfig.EMailProtection = 'none' ; |
|
124 // #330286 remove "Red Title" from Styles list. |
|
125 FCKConfig.CustomStyles = {}; |