PageRenderTime 32ms CodeModel.GetById 14ms app.highlight 15ms RepoModel.GetById 1ms app.codeStats 0ms

/source/Plug-in/fck/fckconfig.js

http://prosporous.googlecode.com/
JavaScript | 303 lines | 185 code | 62 blank | 56 comment | 2 complexity | 0a5b8b7c20dd167736f488425f0fd510 MD5 | raw file
  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( 'Media', 'en,zh,zh-cn' ) ; 
 51// FCKConfig.Plugins.Add( 'autogrow' ) ;
 52// FCKConfig.Plugins.Add( 'dragresizetable' );
 53FCKConfig.AutoGrowMax = 400 ;
 54
 55// FCKConfig.ProtectedSource.Add( /<%[\s\S]*?%>/g ) ;	// ASP style server side code <%...%>
 56// FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ;	// PHP style server side code
 57// FCKConfig.ProtectedSource.Add( /(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi ) ;	// ASP.Net style tags <asp:control>
 58
 59FCKConfig.AutoDetectLanguage	= true ;
 60FCKConfig.DefaultLanguage		= 'en' ;
 61FCKConfig.ContentLangDirection	= 'ltr' ;
 62
 63FCKConfig.ProcessHTMLEntities	= true ;
 64FCKConfig.IncludeLatinEntities	= true ;
 65FCKConfig.IncludeGreekEntities	= true ;
 66
 67FCKConfig.ProcessNumericEntities = false ;
 68
 69FCKConfig.AdditionalNumericEntities = ''  ;		// Single Quote: "'"
 70
 71FCKConfig.FillEmptyBlocks	= true ;
 72
 73FCKConfig.FormatSource		= true ;
 74FCKConfig.FormatOutput		= true ;
 75FCKConfig.FormatIndentator	= '    ' ;
 76
 77FCKConfig.StartupFocus	= false ;
 78FCKConfig.ForcePasteAsPlainText	= false ;
 79FCKConfig.AutoDetectPasteFromWord = true ;	// IE only.
 80FCKConfig.ShowDropDialog = true ;
 81FCKConfig.ForceSimpleAmpersand	= false ;
 82FCKConfig.TabSpaces		= 0 ;
 83FCKConfig.ShowBorders	= true ;
 84FCKConfig.SourcePopup	= false ;
 85FCKConfig.ToolbarStartExpanded	= true ;
 86FCKConfig.ToolbarCanCollapse	= true ;
 87FCKConfig.IgnoreEmptyParagraphValue = true ;
 88FCKConfig.PreserveSessionOnFileBrowser = false ;
 89FCKConfig.FloatingPanelsZIndex = 10000 ;
 90FCKConfig.HtmlEncodeOutput = false ;
 91
 92FCKConfig.TemplateReplaceAll = true ;
 93FCKConfig.TemplateReplaceCheckbox = true ;
 94
 95FCKConfig.ToolbarLocation = 'In' ;
 96
 97FCKConfig.ToolbarSets["Default"] = [
 98	['Bold','Italic','Underline','StrikeThrough','-','TextColor','BGColor','-','Outdent','Indent','Blockquote','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','Templates','Paste','PasteText','PasteWord'],
 99	['Image','Flash','Table','-','Rule','SpecialChar','-','OrderedList','UnorderedList','-','Undo','Redo','-','Link','Unlink','-','RemoveFormat','PageBreak','-','FitWindow','Source'],
100	['Style','FontFormat','FontName','FontSize']
101]
102
103FCKConfig.ToolbarSets["Basic"] = [
104	['Style','FontFormat','FontName','FontSize'],
105	['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','OrderedList','UnorderedList','-','TextColor','BGColor','-','Link','Unlink','-','Image','Smiley']
106] ;
107
108FCKConfig.EnterMode = 'br' ;			// p | div | br
109FCKConfig.ShiftEnterMode = 'p' ;	// p | div | br
110
111FCKConfig.Keystrokes = [
112	[ CTRL + 65 /*A*/, true ],
113	[ CTRL + 67 /*C*/, true ],
114	[ CTRL + 70 /*F*/, true ],
115	[ CTRL + 83 /*S*/, true ],
116	[ CTRL + 88 /*X*/, true ],
117	[ CTRL + 86 /*V*/, 'Paste' ],
118	[ SHIFT + 45 /*INS*/, 'Paste' ],
119	[ CTRL + 88 /*X*/, 'Cut' ],
120	[ SHIFT + 46 /*DEL*/, 'Cut' ],
121	[ CTRL + 90 /*Z*/, 'Undo' ],
122	[ CTRL + 89 /*Y*/, 'Redo' ],
123	[ CTRL + SHIFT + 90 /*Z*/, 'Redo' ],
124	[ CTRL + 76 /*L*/, 'Link' ],
125	[ CTRL + 66 /*B*/, 'Bold' ],
126	[ CTRL + 73 /*I*/, 'Italic' ],
127	[ CTRL + 85 /*U*/, 'Underline' ],
128	[ CTRL + SHIFT + 83 /*S*/, 'Save' ],
129	[ CTRL + ALT + 13 /*ENTER*/, 'FitWindow' ],
130	[ CTRL + 9 /*TAB*/, 'Source' ]
131] ;
132
133FCKConfig.ContextMenu = ['Generic','Link','Anchor','Image','Flash','Select','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','Table','Form'] ;
134FCKConfig.BrowserContextMenuOnCtrl = false ;
135
136FCKConfig.EnableMoreFontColors = true ;
137FCKConfig.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' ;
138
139FCKConfig.FontFormats	= 'p;h1;h2;h3;h4;h5;h6;pre;address;div' ;
140FCKConfig.FontNames		= '??;??;??;??;??_GB2312;??_GB2312;????;????;????;Arial;Comic   Sans   MS;Courier   New;Tahoma;Times   New   Roman;Verdana;'+'Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana;' ;
141FCKConfig.FontSizes		= '12px;14px;16px;18px;24px;26px;28px;32px;smaller;larger;xx-small;x-small;small;medium;large;x-large;xx-large;' ;
142
143FCKConfig.StylesXmlPath		= FCKConfig.EditorPath + 'fckstyles.xml' ;
144FCKConfig.TemplatesXmlPath	= FCKConfig.EditorPath + 'fcktemplates.xml' ;
145
146FCKConfig.SpellChecker			= 'ieSpell' ;	// 'ieSpell' | 'SpellerPages'
147FCKConfig.IeSpellDownloadUrl	= 'http://www.iespell.com/download.php' ;
148FCKConfig.SpellerPagesServerScript = 'server-scripts/spellchecker.php' ;	// Available extension: .php .cfm .pl
149FCKConfig.FirefoxSpellChecker	= false ;
150
151FCKConfig.MaxUndoLevels = 15 ;
152
153FCKConfig.DisableObjectResizing = false ;
154FCKConfig.DisableFFTableHandles = true ;
155
156FCKConfig.LinkDlgHideTarget		= false ;
157FCKConfig.LinkDlgHideAdvanced	= false ;
158
159FCKConfig.ImageDlgHideLink		= false ;
160FCKConfig.ImageDlgHideAdvanced	= false ;
161
162FCKConfig.FlashDlgHideAdvanced	= false ;
163
164FCKConfig.ProtectedTags = '' ;
165
166// This will be applied to the body element of the editor
167FCKConfig.BodyId = '' ;
168FCKConfig.BodyClass = '' ;
169
170FCKConfig.DefaultStyleLabel = '' ;
171FCKConfig.DefaultFontFormatLabel = '' ;
172FCKConfig.DefaultFontLabel = '' ;
173FCKConfig.DefaultFontSizeLabel = '' ;
174
175FCKConfig.DefaultLinkTarget = '' ;
176
177// The option switches between trying to keep the html structure or do the changes so the content looks like it was in Word
178FCKConfig.CleanWordKeepsStructure = false ;
179
180// Only inline elements are valid.
181FCKConfig.RemoveFormatTags = 'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var' ;
182
183FCKConfig.CustomStyles = 
184{
185	'Red Title'	: { Element : 'h3', Styles : { 'color' : 'Red' } }
186};
187
188// Do not add, rename or remove styles here. Only apply definition changes.
189FCKConfig.CoreStyles = 
190{
191	// Basic Inline Styles.
192	'Bold'			: { Element : 'b', Overrides : 'strong' },
193	'Italic'		: { Element : 'i', Overrides : 'em' },
194	'Underline'		: { Element : 'u' },
195	'StrikeThrough'	: { Element : 'strike' },
196	'Subscript'		: { Element : 'sub' },
197	'Superscript'	: { Element : 'sup' },
198	
199	// Basic Block Styles (Font Format Combo).
200	'p'				: { Element : 'p' },
201	'div'			: { Element : 'div' },
202	'pre'			: { Element : 'pre' },
203	'address'		: { Element : 'address' },
204	'h1'			: { Element : 'h1' },
205	'h2'			: { Element : 'h2' },
206	'h3'			: { Element : 'h3' },
207	'h4'			: { Element : 'h4' },
208	'h5'			: { Element : 'h5' },
209	'h6'			: { Element : 'h6' },
210	
211	// Other formatting features.
212	'FontFace' : 
213	{ 
214		Element		: 'span', 
215		Styles		: { 'font-family' : '#("Font")' }, 
216		Overrides	: [ { Element : 'font', Attributes : { 'face' : null } } ]
217	},
218	
219	'Size' :
220	{ 
221		Element		: 'span', 
222		Styles		: { 'font-size' : '#("Size","fontSize")' }, 
223		Overrides	: [ { Element : 'font', Attributes : { 'size' : null } } ]
224	},
225	
226	'Color' :
227	{ 
228		Element		: 'span', 
229		Styles		: { 'color' : '#("Color","color")' }, 
230		Overrides	: [ { Element : 'font', Attributes : { 'color' : null } } ]
231	},
232	
233	'BackColor'		: { Element : 'span', Styles : { 'background-color' : '#("Color","color")' } }
234};
235
236// The distance of an indentation step.
237FCKConfig.IndentLength = 40 ;
238FCKConfig.IndentUnit = 'px' ;
239
240// Alternatively, FCKeditor allows the use of CSS classes for block indentation.
241// This overrides the IndentLength/IndentUnit settings.
242FCKConfig.IndentClasses = [] ;
243
244// [ Left, Center, Right, Justified ]
245FCKConfig.JustifyClasses = [] ;
246
247// The following value defines which File Browser connector and Quick Upload
248// "uploader" to use. It is valid for the default implementaion and it is here
249// just to make this configuration file cleaner.
250// It is not possible to change this value using an external file or even
251// inline when creating the editor instance. In that cases you must set the
252// values of LinkBrowserURL, ImageBrowserURL and so on.
253// Custom implementations should just ignore it.
254var _FileBrowserLanguage	= 'php' ;	// asp | aspx | cfm | lasso | perl | php | py
255var _QuickUploadLanguage	= 'php' ;	// asp | aspx | cfm | lasso | perl | php | py
256
257// Don't care about the following two lines. It just calculates the correct connector
258// extension to use for the default File Browser (Perl uses "cgi").
259var _FileBrowserExtension = _FileBrowserLanguage == 'perl' ? 'cgi' : _FileBrowserLanguage ;
260var _QuickUploadExtension = _QuickUploadLanguage == 'perl' ? 'cgi' : _QuickUploadLanguage ;
261
262FCKConfig.LinkBrowser = true ;
263FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=../../connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;
264FCKConfig.LinkBrowserWindowWidth	= FCKConfig.ScreenWidth * 0.7 ;		// 70%
265FCKConfig.LinkBrowserWindowHeight	= FCKConfig.ScreenHeight * 0.7 ;	// 70%
266
267FCKConfig.ImageBrowser = true ;
268FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=../../connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;
269FCKConfig.ImageBrowserWindowWidth  = FCKConfig.ScreenWidth * 0.7 ;	// 70% ;
270FCKConfig.ImageBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ;	// 70% ;
271
272FCKConfig.FlashBrowser = true ;
273FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=../../connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;
274FCKConfig.FlashBrowserWindowWidth  = FCKConfig.ScreenWidth * 0.7 ;	//70% ;
275FCKConfig.FlashBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ;	//70% ;
276
277FCKConfig.LinkUpload = true ;
278FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension ;
279FCKConfig.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
280FCKConfig.LinkUploadDeniedExtensions	= "" ;	// empty for no one
281
282FCKConfig.ImageUpload = true ;
283FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=Image' ;
284FCKConfig.ImageUploadAllowedExtensions	= ".(jpg|gif|jpeg|png|bmp)$" ;		// empty for all
285FCKConfig.ImageUploadDeniedExtensions	= "" ;							// empty for no one
286
287FCKConfig.FlashUpload = true ;
288FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=Flash' ;
289FCKConfig.FlashUploadAllowedExtensions	= ".(swf|flv)$" ;		// empty for all
290FCKConfig.FlashUploadDeniedExtensions	= "" ;					// empty for no one
291
292//FCKConfig.MediaUpload = true ;
293//FCKConfig.MediaUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=Media' ;
294//FCKConfig.MediaUploadAllowedExtensions = ".(aiff|asf|avi|mid|mov|mp3|mp4|mpc|mpeg|mpg|qt|ram|rm|rmi|rmvb|wav|wma|wmv)$" ;  // empty for all
295//FCKConfig.MediaUploadDeniedExtensions = "" ;       // empty for no one
296
297
298FCKConfig.SmileyPath	= FCKConfig.BasePath + 'images/smiley/msn/' ;
299FCKConfig.SmileyImages	= ['m00.gif','m01.gif','m02.gif','m03.gif','m04.gif','m05.gif','m06.gif','m07.gif','m20.gif','m21.gif','m22.gif','m23.gif','m24.gif','m25.gif','m26.gif','m27.gif','m28.gif','m29.gif','m30.gif','m31.gif','m32.gif','m33.gif','m34.gif','m35.gif','m36.gif','m37.gif','m38.gif','m39.gif','m40.gif','m41.gif','m42.gif','m43.gif','m44.gif','m45.gif','m46.gif','m47.gif','m48.gif','m49.gif','m50.gif','m51.gif','m52.gif','m53.gif','m54.gif','m55.gif','m56.gif','m57.gif','m58.gif','m59.gif','m61.gif','m62.gif','m63.gif','m64.gif','m65.gif','m66.gif','m67.gif','m68.gif','m69.gif','m70.gif','m94.gif','m95.gif','m96.gif','m97.gif','m98.gif','m99.gif'] ;
300FCKConfig.SmileyColumns = 8 ;
301FCKConfig.SmileyWindowWidth		= 400 ;
302FCKConfig.SmileyWindowHeight	= 340 ;
303