您目前尚未登陆,请选择【登陆】或【注册
首页->博客论坛->博客源代码(课程设计,3层架构)>>fckeditor/fckconfig.js>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:博客源代码(课程设计,3层架构)
当前文件:文件类型 MVCBlog/fckeditor/fckconfig.js打开代码结构图
普通视图
		            
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://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.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 = 'zh-cn' ; 63 64FCKConfig.ContentLangDirection = 'ltr' ; 65 66FCKConfig.ProcessHTMLEntities = true ; 67FCKConfig.IncludeLatinEntities = true ; 68FCKConfig.IncludeGreekEntities = true ; 69 70FCKConfig.ProcessNumericEntities = false ; 71 72FCKConfig.AdditionalNumericEntities = '' ; // Single Quote: "'" 73 74FCKConfig.FillEmptyBlocks = true ; 75 76FCKConfig.FormatSource = true ; 77FCKConfig.FormatOutput = true ; 78FCKConfig.FormatIndentator = ' ' ; 79 80FCKConfig.StartupFocus = false ; 81FCKConfig.ForcePasteAsPlainText = false ; 82FCKConfig.AutoDetectPasteFromWord = true ; // IE only. 83FCKConfig.ShowDropDialog = true ; 84FCKConfig.ForceSimpleAmpersand = false ; 85FCKConfig.TabSpaces = 1 ;//允许用TAB 86FCKConfig.ShowBorders = true ; 87FCKConfig.SourcePopup = false ; 88FCKConfig.ToolbarStartExpanded = true ; 89FCKConfig.ToolbarCanCollapse = false ; 90FCKConfig.IgnoreEmptyParagraphValue = true ; 91FCKConfig.PreserveSessionOnFileBrowser = false ; 92FCKConfig.FloatingPanelsZIndex = 10000 ; 93FCKConfig.HtmlEncodeOutput = false ; 94 95FCKConfig.TemplateReplaceAll = true ; 96FCKConfig.TemplateReplaceCheckbox = true ; 97 98FCKConfig.ToolbarLocation = 'In' ; 99 100FCKConfig.ToolbarSets["Default"] = [ 101 102 ['Bold','Italic','Underline'], 103 ['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote'], 104 ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], 105 ['Link','Unlink','Anchor'], 106 ['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'], 107 '/', 108 ['Style','FontFormat','FontName','FontSize'], 109 ['TextColor','BGColor'] // No comma for the last row. 110] ; 111 112FCKConfig.ToolbarSets["Basic"] = [ 113 ['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','About'] 114] ; 115 116FCKConfig.EnterMode = 'p' ; // p | div | br 117FCKConfig.ShiftEnterMode = 'br' ; // p | div | br 118 119FCKConfig.Keystrokes = [ 120 [ CTRL + 65 /*A*/, true ], 121 [ CTRL + 67 /*C*/, true ], 122 [ CTRL + 70 /*F*/, true ], 123 [ CTRL + 83 /*S*/, true ], 124 [ CTRL + 84 /*T*/, true ], 125 [ CTRL + 88 /*X*/, true ], 126 [ CTRL + 86 /*V*/, 'Paste' ], 127 [ SHIFT + 45 /*INS*/, 'Paste' ], 128 [ CTRL + 88 /*X*/, 'Cut' ], 129 [ SHIFT + 46 /*DEL*/, 'Cut' ], 130 [ CTRL + 90 /*Z*/, 'Undo' ], 131 [ CTRL + 89 /*Y*/, 'Redo' ], 132 [ CTRL + SHIFT + 90 /*Z*/, 'Redo' ], 133 [ CTRL + 76 /*L*/, 'Link' ], 134 [ CTRL + 66 /*B*/, 'Bold' ], 135 [ CTRL + 73 /*I*/, 'Italic' ], 136 [ CTRL + 85 /*U*/, 'Underline' ], 137 [ CTRL + SHIFT + 83 /*S*/, 'Save' ], 138 [ CTRL + ALT + 13 /*ENTER*/, 'FitWindow' ] 139] ; 140FCKConfig.FontNames = '宋体;楷体_GB2312;黑体;隶书;Arial;Times New Roman' ; 141FCKConfig.ContextMenu = ['Generic','Link','Anchor','Image','Flash','Select','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','Table','Form'] ; 142FCKConfig.BrowserContextMenuOnCtrl = false ; 143 144FCKConfig.EnableMoreFontColors = true ; 145FCKConfig.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' ; 146 147FCKConfig.FontFormats = 'p;h1;h2;h3;h4;h5;h6;pre;address;div' ; 148 149FCKConfig.FontSizes = 'smaller;larger;xx-small;x-small;small;medium;large;x-large;xx-large' ; 150 151FCKConfig.StylesXmlPath = FCKConfig.EditorPath + 'fckstyles.xml' ; 152FCKConfig.TemplatesXmlPath = FCKConfig.EditorPath + 'fcktemplates.xml' ; 153 154FCKConfig.SpellChecker = 'ieSpell' ; // 'ieSpell' | 'SpellerPages' 155FCKConfig.IeSpellDownloadUrl = 'http://www.iespell.com/download.php' ; 156FCKConfig.SpellerPagesServerScript = 'server-scripts/spellchecker.php' ; // Available extension: .php .cfm .pl 157FCKConfig.FirefoxSpellChecker = false ; 158 159FCKConfig.MaxUndoLevels = 15 ; 160 161FCKConfig.DisableObjectResizing = false ; 162FCKConfig.DisableFFTableHandles = true ; 163 164FCKConfig.LinkDlgHideTarget = false ; 165FCKConfig.LinkDlgHideAdvanced = false ; 166 167FCKConfig.ImageDlgHideLink = false ; 168FCKConfig.ImageDlgHideAdvanced = false ; 169 170FCKConfig.FlashDlgHideAdvanced = false ; 171 172FCKConfig.ProtectedTags = '' ; 173 174// This will be applied to the body element of the editor 175FCKConfig.BodyId = '' ; 176FCKConfig.BodyClass = '' ; 177 178FCKConfig.DefaultStyleLabel = '' ; 179FCKConfig.DefaultFontFormatLabel = '' ; 180FCKConfig.DefaultFontLabel = '' ; 181FCKConfig.DefaultFontSizeLabel = '' ; 182 183FCKConfig.DefaultLinkTarget = '' ; 184 185// The option switches between trying to keep the html structure or do the changes so the content looks like it was in Word 186FCKConfig.CleanWordKeepsStructure = false ; 187 188// Only inline elements are valid. 189FCKConfig.RemoveFormatTags = 'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var' ; 190 191// Attributes that will be removed 192FCKConfig.RemoveAttributes = 'class,style,lang,width,height,align,hspace,valign' ; 193 194FCKConfig.CustomStyles = 195{ 196 'Red Title' : { Element : 'h3', Styles : { 'color' : 'Red' } } 197}; 198 199// Do not add, rename or remove styles here. Only apply definition changes. 200FCKConfig.CoreStyles = 201{ 202 // Basic Inline Styles. 203 'Bold' : { Element : 'strong', Overrides : 'b' }, 204 'Italic' : { Element : 'em', Overrides : 'i' }, 205 'Underline' : { Element : 'u' }, 206 'StrikeThrough' : { Element : 'strike' }, 207 'Subscript' : { Element : 'sub' }, 208 'Superscript' : { Element : 'sup' }, 209 210 // Basic Block Styles (Font Format Combo). 211 'p' : { Element : 'p' }, 212 'div' : { Element : 'div' }, 213 'pre' : { Element : 'pre' }, 214 'address' : { Element : 'address' }, 215 'h1' : { Element : 'h1' }, 216 'h2' : { Element : 'h2' }, 217 'h3' : { Element : 'h3' }, 218 'h4' : { Element : 'h4' }, 219 'h5' : { Element : 'h5' }, 220 'h6' : { Element : 'h6' }, 221 222 // Other formatting features. 223 'FontFace' : 224 { 225 Element : 'span', 226 Styles : { 'font-family' : '#("Font")' }, 227 Overrides : [ { Element : 'font', Attributes : { 'face' : null } } ] 228 }, 229 230 'Size' : 231 { 232 Element : 'span', 233 Styles : { 'font-size' : '#("Size","fontSize")' }, 234