1 | /* |
---|
2 | * FCKeditor - The text editor for Internet - http://www.fckeditor.net |
---|
3 | * Copyright (C) 2003-2007 Frederico Caldeira Knabben |
---|
4 | * |
---|
5 | * == BEGIN LICENSE == |
---|
6 | * |
---|
7 | * Licensed under the terms of any of the following licenses at your |
---|
8 | * choice: |
---|
9 | * |
---|
10 | * - GNU General Public License Version 2 or later (the "GPL") |
---|
11 | * http://www.gnu.org/licenses/gpl.html |
---|
12 | * |
---|
13 | * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") |
---|
14 | * http://www.gnu.org/licenses/lgpl.html |
---|
15 | * |
---|
16 | * - Mozilla Public License Version 1.1 or later (the "MPL") |
---|
17 | * http://www.mozilla.org/MPL/MPL-1.1.html |
---|
18 | * |
---|
19 | * == END LICENSE == |
---|
20 | * |
---|
21 | * Editor configuration settings. |
---|
22 | * |
---|
23 | * Follow this link for more information: |
---|
24 | * http://wiki.fckeditor.net/Developer%27s_Guide/Configuration/Configurations_Settings |
---|
25 | */ |
---|
26 | |
---|
27 | FCKConfig.CustomConfigurationsPath = '' ; |
---|
28 | |
---|
29 | FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ; |
---|
30 | FCKConfig.EditorAreaStyles = '' ; |
---|
31 | FCKConfig.ToolbarComboPreviewCSS = '' ; |
---|
32 | |
---|
33 | FCKConfig.DocType = '' ; |
---|
34 | |
---|
35 | FCKConfig.BaseHref = '' ; |
---|
36 | |
---|
37 | FCKConfig.FullPage = false ; |
---|
38 | |
---|
39 | // The following option determines whether the "Show Blocks" feature is enabled or not at startup. |
---|
40 | FCKConfig.StartupShowBlocks = false ; |
---|
41 | |
---|
42 | FCKConfig.Debug = false ; |
---|
43 | FCKConfig.AllowQueryStringDebug = true ; |
---|
44 | |
---|
45 | FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/' ; |
---|
46 | FCKConfig.PreloadImages = [ FCKConfig.SkinPath + 'images/toolbar.start.gif', FCKConfig.SkinPath + 'images/toolbar.buttonarrow.gif' ] ; |
---|
47 | |
---|
48 | FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/' ; |
---|
49 | FCKConfig.Plugins.Add( 'flvPlayer', 'en'); |
---|
50 | FCKConfig.Plugins.Add( 'autogrow' ) ; |
---|
51 | // FCKConfig.Plugins.Add( 'dragresizetable' ); |
---|
52 | FCKConfig.AutoGrowMax = 400 ; |
---|
53 | |
---|
54 | // FCKConfig.ProtectedSource.Add( /<%[\s\S]*?%>/g ) ; // ASP style server side code <%...%> |
---|
55 | // FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ; // PHP style server side code |
---|
56 | // FCKConfig.ProtectedSource.Add( /(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi ) ; // ASP.Net style tags <asp:control> |
---|
57 | |
---|
58 | FCKConfig.AutoDetectLanguage = true ; |
---|
59 | FCKConfig.DefaultLanguage = 'en' ; |
---|
60 | FCKConfig.ContentLangDirection = 'ltr' ; |
---|
61 | |
---|
62 | FCKConfig.ProcessHTMLEntities = true ; |
---|
63 | FCKConfig.IncludeLatinEntities = true ; |
---|
64 | FCKConfig.IncludeGreekEntities = true ; |
---|
65 | |
---|
66 | FCKConfig.ProcessNumericEntities = false ; |
---|
67 | |
---|
68 | FCKConfig.AdditionalNumericEntities = '' ; // Single Quote: "'" |
---|
69 | |
---|
70 | FCKConfig.FillEmptyBlocks = true ; |
---|
71 | |
---|
72 | FCKConfig.FormatSource = true ; |
---|
73 | FCKConfig.FormatOutput = true ; |
---|
74 | FCKConfig.FormatIndentator = ' ' ; |
---|
75 | |
---|
76 | FCKConfig.StartupFocus = false ; |
---|
77 | FCKConfig.ForcePasteAsPlainText = true ; |
---|
78 | FCKConfig.AutoDetectPasteFromWord = true ; // IE only. |
---|
79 | FCKConfig.ShowDropDialog = true ; |
---|
80 | FCKConfig.ForceSimpleAmpersand = false ; |
---|
81 | FCKConfig.TabSpaces = 0 ; |
---|
82 | FCKConfig.ShowBorders = true ; |
---|
83 | FCKConfig.SourcePopup = false ; |
---|
84 | FCKConfig.ToolbarStartExpanded = true ; |
---|
85 | FCKConfig.ToolbarCanCollapse = true ; |
---|
86 | FCKConfig.IgnoreEmptyParagraphValue = true ; |
---|
87 | FCKConfig.PreserveSessionOnFileBrowser = false ; |
---|
88 | FCKConfig.FloatingPanelsZIndex = 10000 ; |
---|
89 | FCKConfig.HtmlEncodeOutput = false ; |
---|
90 | |
---|
91 | FCKConfig.TemplateReplaceAll = true ; |
---|
92 | FCKConfig.TemplateReplaceCheckbox = true ; |
---|
93 | |
---|
94 | FCKConfig.ToolbarLocation = 'In' ; |
---|
95 | |
---|
96 | FCKConfig.ToolbarSets["Default"] = [ |
---|
97 | ['Source','DocProps','-','Save','NewPage','Preview','-','Templates'], |
---|
98 | ['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'], |
---|
99 | ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'], |
---|
100 | ['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'], |
---|
101 | '/', |
---|
102 | ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'], |
---|
103 | ['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote'], |
---|
104 | ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], |
---|
105 | ['Link','Unlink','Anchor'], |
---|
106 | ['Image','flvPlayer','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'], |
---|
107 | '/', |
---|
108 | ['Style','FontFormat','FontName','FontSize'], |
---|
109 | ['TextColor','BGColor'], |
---|
110 | ['FitWindow','ShowBlocks','-','About'] // No comma for the last row. |
---|
111 | ] ; |
---|
112 | |
---|
113 | FCKConfig.ToolbarSets["Basic"] = [ |
---|
114 | ['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','About'] |
---|
115 | ] ; |
---|
116 | |
---|
117 | FCKConfig.EnterMode = 'p' ; // p | div | br |
---|
118 | FCKConfig.ShiftEnterMode = 'br' ; // p | div | br |
---|
119 | |
---|
120 | FCKConfig.Keystrokes = [ |
---|
121 | [ CTRL + 65 /*A*/, true ], |
---|
122 | [ CTRL + 67 /*C*/, true ], |
---|
123 | [ CTRL + 70 /*F*/, true ], |
---|
124 | [ CTRL + 83 /*S*/, true ], |
---|
125 | [ CTRL + 88 /*X*/, true ], |
---|
126 | [ CTRL + 86 /*V*/, 'Paste' ], |
---|
127 | [ SHIFT + 45 /*INS*/, 'Paste' ], |
---|
128 | [ CTRL + 88 /*X*/, 'Cut' ], |
---|
129 | [ SHIFT + 46 /*DEL*/, 'Cut' ], |
---|
130 | [ CTRL + 90 /*Z*/, 'Undo' ], |
---|
131 | [ CTRL + 89 /*Y*/, 'Redo' ], |
---|
132 | [ CTRL + SHIFT + 90 /*Z*/, 'Redo' ], |
---|
133 | [ CTRL + 76 /*L*/, 'Link' ], |
---|
134 | [ CTRL + 66 /*B*/, 'Bold' ], |
---|
135 | [ CTRL + 73 /*I*/, 'Italic' ], |
---|
136 | [ CTRL + 85 /*U*/, 'Underline' ], |
---|
137 | [ CTRL + SHIFT + 83 /*S*/, 'Save' ], |
---|
138 | [ CTRL + ALT + 13 /*ENTER*/, 'FitWindow' ], |
---|
139 | [ CTRL + 9 /*TAB*/, 'Source' ] |
---|
140 | ] ; |
---|
141 | |
---|
142 | FCKConfig.ContextMenu = ['Generic','Link','Anchor','Image','Flash','Select','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','Table','Form'] ; |
---|
143 | FCKConfig.BrowserContextMenuOnCtrl = false ; |
---|
144 | |
---|
145 | FCKConfig.EnableMoreFontColors = true ; |
---|
146 | FCKConfig.FontColors = '000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,808080,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF' ; |
---|
147 | |
---|
148 | FCKConfig.FontFormats = 'p;h1;h2;h3;h4;h5;h6;pre;address;div' ; |
---|
149 | FCKConfig.FontNames = 'Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ; |
---|
150 | FCKConfig.FontSizes = 'smaller;larger;xx-small;x-small;small;medium;large;x-large;xx-large' ; |
---|
151 | |
---|
152 | FCKConfig.StylesXmlPath = FCKConfig.EditorPath + 'fckstyles.xml' ; |
---|
153 | FCKConfig.TemplatesXmlPath = FCKConfig.EditorPath + 'fcktemplates.xml' ; |
---|
154 | |
---|
155 | FCKConfig.SpellChecker = 'ieSpell' ; // 'ieSpell' | 'SpellerPages' |
---|
156 | FCKConfig.IeSpellDownloadUrl = 'http://www.iespell.com/download.php' ; |
---|
157 | FCKConfig.SpellerPagesServerScript = 'server-scripts/spellchecker.php' ; // Available extension: .php .cfm .pl |
---|
158 | FCKConfig.FirefoxSpellChecker = false ; |
---|
159 | |
---|
160 | FCKConfig.MaxUndoLevels = 15 ; |
---|
161 | |
---|
162 | FCKConfig.DisableObjectResizing = false ; |
---|
163 | FCKConfig.DisableFFTableHandles = true ; |
---|
164 | |
---|
165 | FCKConfig.LinkDlgHideTarget = false ; |
---|
166 | FCKConfig.LinkDlgHideAdvanced = false ; |
---|
167 | |
---|
168 | FCKConfig.ImageDlgHideLink = false ; |
---|
169 | FCKConfig.ImageDlgHideAdvanced = false ; |
---|
170 | |
---|
171 | FCKConfig.FlashDlgHideAdvanced = false ; |
---|
172 | |
---|
173 | FCKConfig.ProtectedTags = '' ; |
---|
174 | |
---|
175 | // This will be applied to the body element of the editor |
---|
176 | FCKConfig.BodyId = '' ; |
---|
177 | FCKConfig.BodyClass = '' ; |
---|
178 | |
---|
179 | FCKConfig.DefaultStyleLabel = '' ; |
---|
180 | FCKConfig.DefaultFontFormatLabel = '' ; |
---|
181 | FCKConfig.DefaultFontLabel = '' ; |
---|
182 | FCKConfig.DefaultFontSizeLabel = '' ; |
---|
183 | |
---|
184 | FCKConfig.DefaultLinkTarget = '' ; |
---|
185 | |
---|
186 | // The option switches between trying to keep the html structure or do the changes so the content looks like it was in Word |
---|
187 | FCKConfig.CleanWordKeepsStructure = false ; |
---|
188 | |
---|
189 | // Only inline elements are valid. |
---|
190 | FCKConfig.RemoveFormatTags = 'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var' ; |
---|
191 | |
---|
192 | FCKConfig.CustomStyles = |
---|
193 | { |
---|
194 | 'Red Title' : { Element : 'h3', Styles : { 'color' : 'Red' } } |
---|
195 | }; |
---|
196 | |
---|
197 | // Do not add, rename or remove styles here. Only apply definition changes. |
---|
198 | FCKConfig.CoreStyles = |
---|
199 | { |
---|
200 | // Basic Inline Styles. |
---|
201 | 'Bold' : { Element : 'b', Overrides : 'strong' }, |
---|
202 | 'Italic' : { Element : 'i', Overrides : 'em' }, |
---|
203 | 'Underline' : { Element : 'u' }, |
---|
204 | 'StrikeThrough' : { Element : 'strike' }, |
---|
205 | 'Subscript' : { Element : 'sub' }, |
---|
206 | 'Superscript' : { Element : 'sup' }, |
---|
207 | |
---|
208 | // Basic Block Styles (Font Format Combo). |
---|
209 | 'p' : { Element : 'p' }, |
---|
210 | 'div' : { Element : 'div' }, |
---|
211 | 'pre' : { Element : 'pre' }, |
---|
212 | 'address' : { Element : 'address' }, |
---|
213 | 'h1' : { Element : 'h1' }, |
---|
214 | 'h2' : { Element : 'h2' }, |
---|
215 | 'h3' : { Element : 'h3' }, |
---|
216 | 'h4' : { Element : 'h4' }, |
---|
217 | 'h5' : { Element : 'h5' }, |
---|
218 | 'h6' : { Element : 'h6' }, |
---|
219 | |
---|
220 | // Other formatting features. |
---|
221 | 'FontFace' : |
---|
222 | { |
---|
223 | Element : 'span', |
---|
224 | Styles : { 'font-family' : '#("Font")' }, |
---|
225 | Overrides : [ { Element : 'font', Attributes : { 'face' : null } } ] |
---|
226 | }, |
---|
227 | |
---|
228 | 'Size' : |
---|
229 | { |
---|
230 | Element : 'span', |
---|
231 | Styles : { 'font-size' : '#("Size","fontSize")' }, |
---|
232 | Overrides : [ { Element : 'font', Attributes : { 'size' : null } } ] |
---|
233 | }, |
---|
234 | |
---|
235 | 'Color' : |
---|
236 | { |
---|
237 | Element : 'span', |
---|
238 | Styles : { 'color' : '#("Color","color")' }, |
---|
239 | Overrides : [ { Element : 'font', Attributes : { 'color' : null } } ] |
---|
240 | }, |
---|
241 | |
---|
242 | 'BackColor' : { Element : 'span', Styles : { 'background-color' : '#("Color","color")' } } |
---|
243 | }; |
---|
244 | |
---|
245 | // The distance of an indentation step. |
---|
246 | FCKConfig.IndentLength = 40 ; |
---|
247 | FCKConfig.IndentUnit = 'px' ; |
---|
248 | |
---|
249 | // Alternatively, FCKeditor allows the use of CSS classes for block indentation. |
---|
250 | // This overrides the IndentLength/IndentUnit settings. |
---|
251 | FCKConfig.IndentClasses = [] ; |
---|
252 | |
---|
253 | // [ Left, Center, Right, Justified ] |
---|
254 | FCKConfig.JustifyClasses = [] ; |
---|
255 | |
---|
256 | // The following value defines which File Browser connector and Quick Upload |
---|
257 | // "uploader" to use. It is valid for the default implementaion and it is here |
---|
258 | // just to make this configuration file cleaner. |
---|
259 | // It is not possible to change this value using an external file or even |
---|
260 | // inline when creating the editor instance. In that cases you must set the |
---|
261 | // values of LinkBrowserURL, ImageBrowserURL and so on. |
---|
262 | // Custom implementations should just ignore it. |
---|
263 | var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py |
---|
264 | var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py |
---|
265 | |
---|
266 | // Don't care about the following two lines. It just calculates the correct connector |
---|
267 | // extension to use for the default File Browser (Perl uses "cgi"). |
---|
268 | var _FileBrowserExtension = _FileBrowserLanguage == 'perl' ? 'cgi' : _FileBrowserLanguage ; |
---|
269 | var _QuickUploadExtension = _QuickUploadLanguage == 'perl' ? 'cgi' : _QuickUploadLanguage ; |
---|
270 | |
---|
271 | FCKConfig.LinkBrowser = true ; |
---|
272 | FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=../../connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ; |
---|
273 | FCKConfig.LinkBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; // 70% |
---|
274 | FCKConfig.LinkBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; // 70% |
---|
275 | |
---|
276 | FCKConfig.ImageBrowser = true ; |
---|
277 | FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=../../connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ; |
---|
278 | FCKConfig.ImageBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; // 70% ; |
---|
279 | FCKConfig.ImageBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; // 70% ; |
---|
280 | |
---|
281 | FCKConfig.FlashBrowser = true ; |
---|
282 | FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=../../connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ; |
---|
283 | FCKConfig.FlashBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; //70% ; |
---|
284 | FCKConfig.FlashBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; //70% ; |
---|
285 | |
---|
286 | FCKConfig.LinkUpload = true ; |
---|
287 | FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension ; |
---|
288 | FCKConfig.LinkUploadAllowedExtensions = ".(7z|aiff|asf|avi|bmp|csv|doc|fla|flv|gif|gz|gzip|jpeg|jpg|mid|mov|mp3|mp4|mpc|mpeg|mpg|ods|odt|pdf|png|ppt|pxd|qt|ram|rar|rm|rmi|rmvb|rtf|sdc|sitd|swf|sxc|sxw|tar|tgz|tif|tiff|txt|vsd|wav|wma|wmv|xls|xml|zip)$" ; // empty for all |
---|
289 | FCKConfig.LinkUploadDeniedExtensions = "" ; // empty for no one |
---|
290 | |
---|
291 | FCKConfig.ImageUpload = true ; |
---|
292 | FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=Image' ; |
---|
293 | FCKConfig.ImageUploadAllowedExtensions = ".(jpg|gif|jpeg|png|bmp)$" ; // empty for all |
---|
294 | FCKConfig.ImageUploadDeniedExtensions = "" ; // empty for no one |
---|
295 | |
---|
296 | FCKConfig.FlashUpload = true ; |
---|
297 | FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=Flash' ; |
---|
298 | FCKConfig.FlashUploadAllowedExtensions = ".(swf|flv)$" ; // empty for all |
---|
299 | FCKConfig.FlashUploadDeniedExtensions = "" ; // empty for no one |
---|
300 | |
---|
301 | FCKConfig.SmileyPath = FCKConfig.BasePath + 'images/smiley/msn/' ; |
---|
302 | FCKConfig.SmileyImages = ['regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif','embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif','devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif','broken_heart.gif','kiss.gif','envelope.gif'] ; |
---|
303 | FCKConfig.SmileyColumns = 8 ; |
---|
304 | FCKConfig.SmileyWindowWidth = 320 ; |
---|
305 | FCKConfig.SmileyWindowHeight = 240 ; |
---|
306 | |
---|