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