Ticket #1764: fckconfig.js

File fckconfig.js, 12.9 KB (added by Chris Randall, 16 years ago)

Configuration file

Line 
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
27FCKConfig.CustomConfigurationsPath = '' ;
28
29FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ;
30FCKConfig.EditorAreaStyles = '' ;
31FCKConfig.ToolbarComboPreviewCSS = '' ;
32
33FCKConfig.DocType = '' ;
34
35FCKConfig.BaseHref = '' ;
36
37FCKConfig.FullPage = false ;
38
39// The following option determines whether the "Show Blocks" feature is enabled or not at startup.
40FCKConfig.StartupShowBlocks = false ;
41
42FCKConfig.Debug = false ;
43FCKConfig.AllowQueryStringDebug = true ;
44
45FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/' ;
46FCKConfig.PreloadImages = [ FCKConfig.SkinPath + 'images/toolbar.start.gif', FCKConfig.SkinPath + 'images/toolbar.buttonarrow.gif' ] ;
47
48FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/' ;
49
50// FCKConfig.Plugins.Add( 'autogrow' ) ;
51// FCKConfig.Plugins.Add( 'dragresizetable' );
52FCKConfig.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
58FCKConfig.AutoDetectLanguage    = false ;
59FCKConfig.DefaultLanguage               = 'en' ;
60FCKConfig.ContentLangDirection  = 'ltr' ;
61
62FCKConfig.ProcessHTMLEntities   = true ;
63FCKConfig.IncludeLatinEntities  = true ;
64FCKConfig.IncludeGreekEntities  = true ;
65
66FCKConfig.ProcessNumericEntities = false ;
67
68FCKConfig.AdditionalNumericEntities = ''  ;             // Single Quote: "'"
69
70FCKConfig.FillEmptyBlocks       = false ;
71
72FCKConfig.FormatSource          = true ;
73FCKConfig.FormatOutput          = false ;
74FCKConfig.FormatIndentator      = '    ' ;
75
76FCKConfig.StartupFocus  = false ;
77FCKConfig.ForcePasteAsPlainText = false ;
78FCKConfig.AutoDetectPasteFromWord = true ;      // IE only.
79FCKConfig.ShowDropDialog = true ;
80FCKConfig.ForceSimpleAmpersand  = false ;
81FCKConfig.TabSpaces             = 0 ;
82FCKConfig.ShowBorders   = true ;
83FCKConfig.SourcePopup   = false ;
84FCKConfig.ToolbarStartExpanded  = true ;
85FCKConfig.ToolbarCanCollapse    = true ;
86FCKConfig.IgnoreEmptyParagraphValue = true ;
87FCKConfig.PreserveSessionOnFileBrowser = false ;
88FCKConfig.FloatingPanelsZIndex = 10000 ;
89FCKConfig.HtmlEncodeOutput = true ;
90
91FCKConfig.TemplateReplaceAll = true ;
92FCKConfig.TemplateReplaceCheckbox = true ;
93
94FCKConfig.ToolbarLocation = 'In' ;
95
96FCKConfig.ToolbarSets["OMC"] = [
97        ['NewPage','-','Bold','Italic','OrderedList','UnorderedList','-','Find','Replace','-','Cut','Copy','Paste','PasteText','PasteWord','Undo','Redo','SelectAll','RemoveFormat','-','Source','Preview','FitWindow','ShowBlocks']
98] ;
99
100FCKConfig.ToolbarSets["Default"] = [
101        ['Source','DocProps','-','Save','NewPage','Preview','-','Templates'],
102        ['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
103        ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
104        ['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
105        '/',
106        ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
107        ['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote'],
108        ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
109        ['Link','Unlink','Anchor'],
110        ['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'],
111        '/',
112        ['Style','FontFormat','FontName','FontSize'],
113        ['TextColor','BGColor'],
114        ['FitWindow','ShowBlocks','-','About']          // No comma for the last row.
115] ;
116
117FCKConfig.ToolbarSets["Basic"] = [
118        ['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','About']
119] ;
120
121FCKConfig.EnterMode = 'p' ;                     // p | div | br
122FCKConfig.ShiftEnterMode = 'br' ;       // p | div | br
123
124FCKConfig.Keystrokes = [
125        [ CTRL + 65 /*A*/, true ],
126        [ CTRL + 67 /*C*/, true ],
127        [ CTRL + 70 /*F*/, true ],
128//      [ CTRL + 83 /*S*/, true ],
129        [ CTRL + 88 /*X*/, true ],
130        [ CTRL + 86 /*V*/, 'Paste' ],
131        [ SHIFT + 45 /*INS*/, 'Paste' ],
132        [ CTRL + 88 /*X*/, 'Cut' ],
133        [ SHIFT + 46 /*DEL*/, 'Cut' ],
134        [ CTRL + 90 /*Z*/, 'Undo' ],
135        [ CTRL + 89 /*Y*/, 'Redo' ],
136        [ CTRL + SHIFT + 90 /*Z*/, 'Redo' ],
137//      [ CTRL + 76 /*L*/, 'Link' ],
138        [ CTRL + 66 /*B*/, 'Bold' ],
139        [ CTRL + 73 /*I*/, 'Italic' ],
140//      [ CTRL + 85 /*U*/, 'Underline' ],
141//      [ CTRL + SHIFT + 83 /*S*/, 'Save' ],
142        [ CTRL + ALT + 13 /*ENTER*/, 'FitWindow' ],
143        [ CTRL + 9 /*TAB*/, 'Source' ]
144] ;
145
146FCKConfig.ContextMenu = ['Generic','Link','Anchor','Image','Flash','Select','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','Table','Form'] ;
147FCKConfig.BrowserContextMenuOnCtrl = false ;
148
149FCKConfig.EnableMoreFontColors = true ;
150FCKConfig.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' ;
151
152FCKConfig.FontFormats   = 'p;h1;h2;h3;h4;h5;h6;pre;address;div' ;
153FCKConfig.FontNames             = 'Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;
154FCKConfig.FontSizes             = 'smaller;larger;xx-small;x-small;small;medium;large;x-large;xx-large' ;
155
156FCKConfig.StylesXmlPath         = FCKConfig.EditorPath + 'fckstyles.xml' ;
157FCKConfig.TemplatesXmlPath      = FCKConfig.EditorPath + 'fcktemplates.xml' ;
158
159FCKConfig.SpellChecker                  = 'ieSpell' ;   // 'ieSpell' | 'SpellerPages'
160FCKConfig.IeSpellDownloadUrl    = 'http://www.iespell.com/download.php' ;
161FCKConfig.SpellerPagesServerScript = 'server-scripts/spellchecker.php' ;        // Available extension: .php .cfm .pl
162FCKConfig.FirefoxSpellChecker   = false ;
163
164FCKConfig.MaxUndoLevels = 15 ;
165
166FCKConfig.DisableObjectResizing = false ;
167FCKConfig.DisableFFTableHandles = true ;
168
169FCKConfig.LinkDlgHideTarget             = false ;
170FCKConfig.LinkDlgHideAdvanced   = false ;
171
172FCKConfig.ImageDlgHideLink              = false ;
173FCKConfig.ImageDlgHideAdvanced  = false ;
174
175FCKConfig.FlashDlgHideAdvanced  = false ;
176
177FCKConfig.ProtectedTags = '' ;
178
179// This will be applied to the body element of the editor
180FCKConfig.BodyId = '' ;
181FCKConfig.BodyClass = '' ;
182
183FCKConfig.DefaultStyleLabel = '' ;
184FCKConfig.DefaultFontFormatLabel = '' ;
185FCKConfig.DefaultFontLabel = '' ;
186FCKConfig.DefaultFontSizeLabel = '' ;
187
188FCKConfig.DefaultLinkTarget = '' ;
189
190// The option switches between trying to keep the html structure or do the changes so the content looks like it was in Word
191FCKConfig.CleanWordKeepsStructure = true ;
192
193// Only inline elements are valid.
194FCKConfig.RemoveFormatTags = 'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var' ;
195
196FCKConfig.CustomStyles = 
197{
198        'Red Title'     : { Element : 'h3', Styles : { 'color' : 'Red' } }
199};
200
201// Do not add, rename or remove styles here. Only apply definition changes.
202FCKConfig.CoreStyles = 
203{
204        // Basic Inline Styles.
205        'Bold'                  : { Element : 'b', Overrides : 'strong' },
206        'Italic'                : { Element : 'i', Overrides : 'em' },
207        'Underline'             : { Element : 'u' },
208        'StrikeThrough' : { Element : 'strike' },
209        'Subscript'             : { Element : 'sub' },
210        'Superscript'   : { Element : 'sup' },
211       
212        // Basic Block Styles (Font Format Combo).
213        'p'                             : { Element : 'p' },
214        'div'                   : { Element : 'div' },
215        'pre'                   : { Element : 'pre' },
216        'address'               : { Element : 'address' },
217        'h1'                    : { Element : 'h1' },
218        'h2'                    : { Element : 'h2' },
219        'h3'                    : { Element : 'h3' },
220        'h4'                    : { Element : 'h4' },
221        'h5'                    : { Element : 'h5' },
222        'h6'                    : { Element : 'h6' },
223       
224        // Other formatting features.
225        'FontFace' : 
226        { 
227                Element         : 'span', 
228                Styles          : { 'font-family' : '#("Font")' }, 
229                Overrides       : [ { Element : 'font', Attributes : { 'face' : null } } ]
230        },
231       
232        'Size' :
233        { 
234                Element         : 'span', 
235                Styles          : { 'font-size' : '#("Size","fontSize")' }, 
236                Overrides       : [ { Element : 'font', Attributes : { 'size' : null } } ]
237        },
238       
239        'Color' :
240        { 
241                Element         : 'span', 
242                Styles          : { 'color' : '#("Color","color")' }, 
243                Overrides       : [ { Element : 'font', Attributes : { 'color' : null } } ]
244        },
245       
246        'BackColor'             : { Element : 'span', Styles : { 'background-color' : '#("Color","color")' } }
247};
248
249// The distance of an indentation step.
250FCKConfig.IndentLength = 40 ;
251FCKConfig.IndentUnit = 'px' ;
252
253// Alternatively, FCKeditor allows the use of CSS classes for block indentation.
254// This overrides the IndentLength/IndentUnit settings.
255FCKConfig.IndentClasses = [] ;
256
257// [ Left, Center, Right, Justified ]
258FCKConfig.JustifyClasses = [] ;
259
260// The following value defines which File Browser connector and Quick Upload
261// "uploader" to use. It is valid for the default implementaion and it is here
262// just to make this configuration file cleaner.
263// It is not possible to change this value using an external file or even
264// inline when creating the editor instance. In that cases you must set the
265// values of LinkBrowserURL, ImageBrowserURL and so on.
266// Custom implementations should just ignore it.
267var _FileBrowserLanguage        = 'cfm' ;       // asp | aspx | cfm | lasso | perl | php | py
268var _QuickUploadLanguage        = 'cfm' ;       // asp | aspx | cfm | lasso | perl | php | py
269
270// Don't care about the following two lines. It just calculates the correct connector
271// extension to use for the default File Browser (Perl uses "cgi").
272var _FileBrowserExtension = _FileBrowserLanguage == 'perl' ? 'cgi' : _FileBrowserLanguage ;
273var _QuickUploadExtension = _QuickUploadLanguage == 'perl' ? 'cgi' : _QuickUploadLanguage ;
274
275FCKConfig.LinkBrowser = true ;
276FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=../../connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;
277FCKConfig.LinkBrowserWindowWidth        = FCKConfig.ScreenWidth * 0.7 ;         // 70%
278FCKConfig.LinkBrowserWindowHeight       = FCKConfig.ScreenHeight * 0.7 ;        // 70%
279
280FCKConfig.ImageBrowser = true ;
281FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=../../connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;
282FCKConfig.ImageBrowserWindowWidth  = FCKConfig.ScreenWidth * 0.7 ;      // 70% ;
283FCKConfig.ImageBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ;     // 70% ;
284
285FCKConfig.FlashBrowser = true ;
286FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=../../connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;
287FCKConfig.FlashBrowserWindowWidth  = FCKConfig.ScreenWidth * 0.7 ;      //70% ;
288FCKConfig.FlashBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ;     //70% ;
289
290FCKConfig.LinkUpload = true ;
291FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension ;
292FCKConfig.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
293FCKConfig.LinkUploadDeniedExtensions    = "" ;  // empty for no one
294
295FCKConfig.ImageUpload = true ;
296FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=Image' ;
297FCKConfig.ImageUploadAllowedExtensions  = ".(jpg|gif|jpeg|png|bmp)$" ;          // empty for all
298FCKConfig.ImageUploadDeniedExtensions   = "" ;                                                  // empty for no one
299
300FCKConfig.FlashUpload = true ;
301FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=Flash' ;
302FCKConfig.FlashUploadAllowedExtensions  = ".(swf|flv)$" ;               // empty for all
303FCKConfig.FlashUploadDeniedExtensions   = "" ;                                  // empty for no one
304
305FCKConfig.SmileyPath    = FCKConfig.BasePath + 'images/smiley/msn/' ;
306FCKConfig.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'] ;
307FCKConfig.SmileyColumns = 8 ;
308FCKConfig.SmileyWindowWidth             = 320 ;
309FCKConfig.SmileyWindowHeight    = 240 ;
310
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy