source: sandbox/filemanager/tp/fckeditor/fckconfig.js @ 1575

Revision 1575, 14.1 KB checked in by amuller, 14 years ago (diff)

Ticket #597 - Implentação, melhorias do modulo gerenciador de arquivos

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