Project

General

Profile

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

    
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.SkinEditorCSS = '' ;	// FCKConfig.SkinPath + "|<minified css>" ;
47
FCKConfig.SkinDialogCSS = '' ;	// FCKConfig.SkinPath + "|<minified css>" ;
48

    
49
FCKConfig.PreloadImages = [ FCKConfig.SkinPath + 'images/toolbar.start.gif', FCKConfig.SkinPath + 'images/toolbar.buttonarrow.gif' ] ;
50

    
51
FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/' ;
52

    
53
// FCKConfig.Plugins.Add( 'autogrow' ) ;
54
// FCKConfig.Plugins.Add( 'dragresizetable' );
55
FCKConfig.AutoGrowMax = 400 ;
56

    
57
// FCKConfig.ProtectedSource.Add( /<%[\s\S]*?%>/g ) ;	// ASP style server side code <%...%>
58
// FCKConfig.ProtectedSource.Add( /(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi ) ;	// ASP.Net style tags <asp:control>
59
// FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ;	// PHP style server side code
60
// FCKConfig.ProtectedSource.Add( /<object[\s|\S]+?<\/object>/gi ) ;
61

    
62
FCKConfig.AutoDetectLanguage	= true ;
63
FCKConfig.DefaultLanguage		= 'en' ;
64
FCKConfig.ContentLangDirection	= 'ltr' ;
65

    
66
FCKConfig.ProcessHTMLEntities	= true ;
67
FCKConfig.IncludeLatinEntities	= true ;
68
FCKConfig.IncludeGreekEntities	= true ;
69

    
70
FCKConfig.ProcessNumericEntities = false ;
71

    
72
FCKConfig.AdditionalNumericEntities = ''  ;		// Single Quote: "'"
73

    
74
FCKConfig.FillEmptyBlocks	= true ;
75

    
76
FCKConfig.FormatSource		= true ;
77
FCKConfig.FormatOutput		= true ;
78
FCKConfig.FormatIndentator	= '    ' ;
79

    
80
FCKConfig.EMailProtection = 'none' ; // none | encode | function
81
FCKConfig.EMailProtectionFunction = 'mt(NAME,DOMAIN,SUBJECT,BODY)' ;
82

    
83
FCKConfig.StartupFocus	= false ;
84
FCKConfig.ForcePasteAsPlainText	= false ;
85
FCKConfig.AutoDetectPasteFromWord = true ;	// IE only.
86
FCKConfig.ShowDropDialog = true ;
87
FCKConfig.ForceSimpleAmpersand	= false ;
88
FCKConfig.TabSpaces		= 0 ;
89
FCKConfig.ShowBorders	= true ;
90
FCKConfig.SourcePopup	= false ;
91
FCKConfig.ToolbarStartExpanded	= true ;
92
FCKConfig.ToolbarCanCollapse	= true ;
93
FCKConfig.IgnoreEmptyParagraphValue = true ;
94
FCKConfig.FloatingPanelsZIndex = 10000 ;
95
FCKConfig.HtmlEncodeOutput = false ;
96

    
97
FCKConfig.TemplateReplaceAll = true ;
98
FCKConfig.TemplateReplaceCheckbox = true ;
99

    
100
FCKConfig.ToolbarLocation = 'In' ;
101

    
102
FCKConfig.ToolbarSets["Default"] = [
103
	['Source','DocProps','-','Save','NewPage','Preview','-','Templates'],
104
	['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
105
	['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
106
	['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
107
	'/',
108
	['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
109
	['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'],
110
	['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
111
	['Link','Unlink','Anchor'],
112
	['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'],
113
	'/',
114
	['Style','FontFormat','FontName','FontSize'],
115
	['TextColor','BGColor'],
116
	['FitWindow','ShowBlocks','-','About']		// No comma for the last row.
117
] ;
118

    
119
FCKConfig.ToolbarSets["Basic"] = [
120
	['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','About']
121
] ;
122

    
123
FCKConfig.EnterMode = 'p' ;			// p | div | br
124
FCKConfig.ShiftEnterMode = 'br' ;	// p | div | br
125

    
126
FCKConfig.Keystrokes = [
127
	[ CTRL + 65 /*A*/, true ],
128
	[ CTRL + 67 /*C*/, true ],
129
	[ CTRL + 70 /*F*/, true ],
130
	[ CTRL + 83 /*S*/, true ],
131
	[ CTRL + 84 /*T*/, true ],
132
	[ CTRL + 88 /*X*/, true ],
133
	[ CTRL + 86 /*V*/, 'Paste' ],
134
	[ CTRL + 45 /*INS*/, true ],
135
	[ SHIFT + 45 /*INS*/, 'Paste' ],
136
	[ CTRL + 88 /*X*/, 'Cut' ],
137
	[ SHIFT + 46 /*DEL*/, 'Cut' ],
138
	[ CTRL + 90 /*Z*/, 'Undo' ],
139
	[ CTRL + 89 /*Y*/, 'Redo' ],
140
	[ CTRL + SHIFT + 90 /*Z*/, 'Redo' ],
141
	[ CTRL + 76 /*L*/, 'Link' ],
142
	[ CTRL + 66 /*B*/, 'Bold' ],
143
	[ CTRL + 73 /*I*/, 'Italic' ],
144
	[ CTRL + 85 /*U*/, 'Underline' ],
145
	[ CTRL + SHIFT + 83 /*S*/, 'Save' ],
146
	[ CTRL + ALT + 13 /*ENTER*/, 'FitWindow' ],
147
	[ SHIFT + 32 /*SPACE*/, 'Nbsp' ]
148
] ;
149

    
150
FCKConfig.ContextMenu = ['Generic','Link','Anchor','Image','Flash','Select','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','Table','Form','DivContainer'] ;
151
FCKConfig.BrowserContextMenuOnCtrl = false ;
152
FCKConfig.BrowserContextMenu = false ;
153

    
154
FCKConfig.EnableMoreFontColors = true ;
155
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' ;
156

    
157
FCKConfig.FontFormats	= 'p;h1;h2;h3;h4;h5;h6;pre;address;div' ;
158
FCKConfig.FontNames		= 'Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;
159
FCKConfig.FontSizes		= 'smaller;larger;xx-small;x-small;small;medium;large;x-large;xx-large' ;
160

    
161
FCKConfig.StylesXmlPath		= FCKConfig.EditorPath + 'fckstyles.xml' ;
162
FCKConfig.TemplatesXmlPath	= FCKConfig.EditorPath + 'fcktemplates.xml' ;
163

    
164
FCKConfig.SpellChecker			= 'WSC' ;	// 'WSC' | 'SCAYT' | 'SpellerPages' | 'ieSpell'
165
FCKConfig.IeSpellDownloadUrl	= 'http://www.iespell.com/download.php' ;
166
FCKConfig.SpellerPagesServerScript = 'server-scripts/spellchecker.php' ;	// Available extension: .php .cfm .pl
167
FCKConfig.FirefoxSpellChecker	= false ;
168

    
169
FCKConfig.MaxUndoLevels = 15 ;
170

    
171
FCKConfig.DisableObjectResizing = false ;
172
FCKConfig.DisableFFTableHandles = true ;
173

    
174
FCKConfig.LinkDlgHideTarget		= false ;
175
FCKConfig.LinkDlgHideAdvanced	= false ;
176

    
177
FCKConfig.ImageDlgHideLink		= false ;
178
FCKConfig.ImageDlgHideAdvanced	= false ;
179

    
180
FCKConfig.FlashDlgHideAdvanced	= false ;
181

    
182
FCKConfig.ProtectedTags = '' ;
183

    
184
// This will be applied to the body element of the editor
185
FCKConfig.BodyId = '' ;
186
FCKConfig.BodyClass = '' ;
187

    
188
FCKConfig.DefaultStyleLabel = '' ;
189
FCKConfig.DefaultFontFormatLabel = '' ;
190
FCKConfig.DefaultFontLabel = '' ;
191
FCKConfig.DefaultFontSizeLabel = '' ;
192

    
193
FCKConfig.DefaultLinkTarget = '' ;
194

    
195
// The option switches between trying to keep the html structure or do the changes so the content looks like it was in Word
196
FCKConfig.CleanWordKeepsStructure = false ;
197

    
198
// Only inline elements are valid.
199
FCKConfig.RemoveFormatTags = 'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var' ;
200

    
201
// Attributes that will be removed
202
FCKConfig.RemoveAttributes = 'class,style,lang,width,height,align,hspace,valign' ;
203

    
204
FCKConfig.CustomStyles =
205
{
206
	'Red Title'	: { Element : 'h3', Styles : { 'color' : 'Red' } }
207
};
208

    
209
// Do not add, rename or remove styles here. Only apply definition changes.
210
FCKConfig.CoreStyles =
211
{
212
	// Basic Inline Styles.
213
	'Bold'			: { Element : 'strong', Overrides : 'b' },
214
	'Italic'		: { Element : 'em', Overrides : 'i' },
215
	'Underline'		: { Element : 'u' },
216
	'StrikeThrough'	: { Element : 'strike' },
217
	'Subscript'		: { Element : 'sub' },
218
	'Superscript'	: { Element : 'sup' },
219

    
220
	// Basic Block Styles (Font Format Combo).
221
	'p'				: { Element : 'p' },
222
	'div'			: { Element : 'div' },
223
	'pre'			: { Element : 'pre' },
224
	'address'		: { Element : 'address' },
225
	'h1'			: { Element : 'h1' },
226
	'h2'			: { Element : 'h2' },
227
	'h3'			: { Element : 'h3' },
228
	'h4'			: { Element : 'h4' },
229
	'h5'			: { Element : 'h5' },
230
	'h6'			: { Element : 'h6' },
231

    
232
	// Other formatting features.
233
	'FontFace' :
234
	{
235
		Element		: 'span',
236
		Styles		: { 'font-family' : '#("Font")' },
237
		Overrides	: [ { Element : 'font', Attributes : { 'face' : null } } ]
238
	},
239

    
240
	'Size' :
241
	{
242
		Element		: 'span',
243
		Styles		: { 'font-size' : '#("Size","fontSize")' },
244
		Overrides	: [ { Element : 'font', Attributes : { 'size' : null } } ]
245
	},
246

    
247
	'Color' :
248
	{
249
		Element		: 'span',
250
		Styles		: { 'color' : '#("Color","color")' },
251
		Overrides	: [ { Element : 'font', Attributes : { 'color' : null } } ]
252
	},
253

    
254
	'BackColor'		: { Element : 'span', Styles : { 'background-color' : '#("Color","color")' } },
255

    
256
	'SelectionHighlight' : { Element : 'span', Styles : { 'background-color' : 'navy', 'color' : 'white' } }
257
};
258

    
259
// The distance of an indentation step.
260
FCKConfig.IndentLength = 40 ;
261
FCKConfig.IndentUnit = 'px' ;
262

    
263
// Alternatively, FCKeditor allows the use of CSS classes for block indentation.
264
// This overrides the IndentLength/IndentUnit settings.
265
FCKConfig.IndentClasses = [] ;
266

    
267
// [ Left, Center, Right, Justified ]
268
FCKConfig.JustifyClasses = [] ;
269

    
270
// The following value defines which File Browser connector and Quick Upload
271
// "uploader" to use. It is valid for the default implementaion and it is here
272
// just to make this configuration file cleaner.
273
// It is not possible to change this value using an external file or even
274
// inline when creating the editor instance. In that cases you must set the
275
// values of LinkBrowserURL, ImageBrowserURL and so on.
276
// Custom implementations should just ignore it.
277
var _FileBrowserLanguage	= 'php' ;	// asp | aspx | cfm | lasso | perl | php | py
278
var _QuickUploadLanguage	= 'php' ;	// asp | aspx | cfm | lasso | perl | php | py
279

    
280
// Don't care about the following two lines. It just calculates the correct connector
281
// extension to use for the default File Browser (Perl uses "cgi").
282
var _FileBrowserExtension = _FileBrowserLanguage == 'perl' ? 'cgi' : _FileBrowserLanguage ;
283
var _QuickUploadExtension = _QuickUploadLanguage == 'perl' ? 'cgi' : _QuickUploadLanguage ;
284

    
285
FCKConfig.LinkBrowser = true ;
286
FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=' + encodeURIComponent( FCKConfig.BasePath + 'filemanager/connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ) ;
287
FCKConfig.LinkBrowserWindowWidth	= FCKConfig.ScreenWidth * 0.7 ;		// 70%
288
FCKConfig.LinkBrowserWindowHeight	= FCKConfig.ScreenHeight * 0.7 ;	// 70%
289

    
290
FCKConfig.ImageBrowser = true ;
291
FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=' + encodeURIComponent( FCKConfig.BasePath + 'filemanager/connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ) ;
292
FCKConfig.ImageBrowserWindowWidth  = FCKConfig.ScreenWidth * 0.7 ;	// 70% ;
293
FCKConfig.ImageBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ;	// 70% ;
294

    
295
FCKConfig.FlashBrowser = true ;
296
FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=' + encodeURIComponent( FCKConfig.BasePath + 'filemanager/connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ) ;
297
FCKConfig.FlashBrowserWindowWidth  = FCKConfig.ScreenWidth * 0.7 ;	//70% ;
298
FCKConfig.FlashBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ;	//70% ;
299
// Added for flv support.
300
FCKConfig.MediaBrowser = true ;
301
FCKConfig.MediaBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Media&Connector=' + encodeURIComponent( FCKConfig.BasePath + 'filemanager/connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ) ;
302
FCKConfig.MediaBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; //70% ;
303
FCKConfig.MediaBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; //70% ;
304

    
305
FCKConfig.LinkUpload = true ;
306
FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension ;
307
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
308
FCKConfig.LinkUploadDeniedExtensions	= "" ;	// empty for no one
309

    
310
FCKConfig.ImageUpload = true ;
311
FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=Image' ;
312
FCKConfig.ImageUploadAllowedExtensions	= ".(jpg|gif|jpeg|png|bmp)$" ;		// empty for all
313
FCKConfig.ImageUploadDeniedExtensions	= "" ;							// empty for no one
314

    
315
FCKConfig.FlashUpload = true ;
316
FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=Flash' ;
317
FCKConfig.FlashUploadAllowedExtensions	= ".(swf|flv)$" ;		// empty for all
318
FCKConfig.FlashUploadDeniedExtensions	= "" ;					// empty for no one
319

    
320
FCKConfig.SmileyPath	= FCKConfig.BasePath + 'images/smiley/msn/' ;
321
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'] ;
322
FCKConfig.SmileyColumns = 8 ;
323
FCKConfig.SmileyWindowWidth		= 320 ;
324
FCKConfig.SmileyWindowHeight	= 210 ;
325

    
326
FCKConfig.BackgroundBlockerColor = '#ffffff' ;
327
FCKConfig.BackgroundBlockerOpacity = 0.50 ;
328

    
329
FCKConfig.MsWebBrowserControlCompat = false ;
330

    
331
FCKConfig.PreventSubmitHandler = false ;
(5-5/14)