Ticket #2723: fckconfig.js

File fckconfig.js, 15.6 KB (added by Герман Клюшин, 16 years ago)

my editor configuration

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