现在的位置: 首页 > 综合 > 正文

FCKEditor:fckconfig.js配置文件说明

2013年12月01日 ⁄ 综合 ⁄ 共 9977字 ⁄ 字号 评论关闭

/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net

* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
*       - GNU General Public License Version 2 or later (the "GPL")
*    http://www.gnu.org/licenses/gpl.html

*
*       - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
*    http://www.gnu.org/licenses/lgpl.html

*
*       - Mozilla Public License Version 1.1 or later (the "MPL")
*    http://www.mozilla.org/MPL/MPL-1.1.html

*
* == END LICENSE ==
*
* Editor configuration settings.
*
* Follow this link for more information:
* http://wiki.fckeditor.net/Developer%27s_Guide/Configuration/Configurations_Settings

*/

// Disable the custom Enter Key Handler. This option will be removed in version 2.5.
FCKConfig.DisableEnterKeyHandler = false ;

FCKConfig.CustomConfigurationsPath = '' ;//自定义配置文件路径和名称

FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ;//编辑区的样式表文件

FCKConfig.ToolbarComboPreviewCSS = '' ;

FCKConfig.DocType = '' ;

FCKConfig.BaseHref = '' ;//相对链接的基地址

FCKConfig.FullPage = false ;//是否允许编辑整个HTML文件,还是仅允许编辑BODY间的内容

FCKConfig.Debug = false ;//是否开启调试功能,这样,当调用FCKDebug.Output()时,会在调试窗中输出内容

FCKConfig.AllowQueryStringDebug = true ;

FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/' ;//
默认皮肤,可修改为:'skins/office2003/'


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

FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/' ;//插件文件夹

// FCKConfig.Plugins.Add( 'autogrow' ) ;
FCKConfig.AutoGrowMax = 400 ;

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

FCKConfig.AutoDetectLanguage = true ;//浏览器自动检测语言,应改为false

FCKConfig.DefaultLanguage       = 'en'//
默认语言为英文,应改为'zh-cn'

FCKConfig.ContentLangDirection = 'ltr' ;//默认文字方向

FCKConfig.ProcessHTMLEntities = true ;
FCKConfig.IncludeLatinEntities = true ;
FCKConfig.IncludeGreekEntities = true ;

FCKConfig.ProcessNumericEntities = false ;

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

FCKConfig.FillEmptyBlocks = true ;//使用这个功能,可以将空的块级元素用空格来替代

FCKConfig.FormatSource       = true ;//在切换到代码视图时是否自动格式化代码

FCKConfig.FormatOutput       = true ;//当输出内容时是否自动格式化代码

FCKConfig.FormatIndentator = '         ' ;//当在源码格式下缩进代码使用的字符

FCKConfig.ForceStrongEm = true ;
FCKConfig.GeckoUseSPAN = false ;//是否允许SPAN标记代替B,I,U标记

FCKConfig.StartupFocus = false ;//开启时FOCUS到编辑器

FCKConfig.ForcePasteAsPlainText = false ;//强制粘贴为纯文本

FCKConfig.AutoDetectPasteFromWord = true ; // IE only.
FCKConfig.ForceSimpleAmpersand = false ;//是否不把&符号转换为XML实体

FCKConfig.TabSpaces       = 1 ;//TAB键产生的空格字符数

FCKConfig.ShowBorders = true ;//合并边框

FCKConfig.SourcePopup = false ;
FCKConfig.ToolbarStartExpanded = true ;//开启是TOOLBAR是否展开

FCKConfig.ToolbarCanCollapse = true ;//是否允许展开/折叠工具栏

FCKConfig.IgnoreEmptyParagraphValue = true ;
FCKConfig.PreserveSessionOnFileBrowser = false ;
FCKConfig.FloatingPanelsZIndex = 10000 ;

FCKConfig.TemplateReplaceAll = true ;
FCKConfig.TemplateReplaceCheckbox = true ;

FCKConfig.ToolbarLocation = 'In' ;

//ToolbarSets表示设置 default默认设置.Basic基本设置.

FCKConfig.ToolbarSets["Default"] = [
['Source','DocProps','-','Save','NewPage','Preview','-','Templates'],
['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
'/',
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
['OrderedList','UnorderedList','-','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink','Anchor'],
['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'],
'/',
['Style','FontFormat','FontName','FontSize'],
['TextColor','BGColor'],
['FitWindow','-','About']
] ;

FCKConfig.ToolbarSets["Basic"] = [
['Bold','Italic','-','OrderedList','UnorderedList','-',/*'Link',*/'Unlink','-','Style','FontSize','TextColor','BGColor','-','Smiley','SpecialChar','Replace','Preview']

] ;

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

FCKConfig.Keystrokes = [
[ CTRL + 65 /*A*/, true ],
[ CTRL + 67 /*C*/, true ],
[ CTRL + 70 /*F*/, true ],
[ CTRL + 83 /*S*/, true ],
[ CTRL + 88 /*X*/, true ],
[ CTRL + 86 /*V*/, 'Paste' ],
[ SHIFT + 45 /*INS*/, 'Paste' ],
[ CTRL + 90 /*Z*/, 'Undo' ],
[ CTRL + 89 /*Y*/, 'Redo' ],
[ CTRL + SHIFT + 90 /*Z*/, 'Redo' ],
[ CTRL + 76 /*L*/, 'Link' ],
[ CTRL + 66 /*B*/, 'Bold' ],
[ CTRL + 73 /*I*/, 'Italic' ],
[ CTRL + 85 /*U*/, 'Underline' ],
[ CTRL + SHIFT + 83 /*S*/, 'Save' ],
[ CTRL + ALT + 13 /*ENTER*/, 'FitWindow' ],
[ CTRL + 9 /*TAB*/, 'Source' ]
] ;

FCKConfig.ContextMenu =
['Generic','Link','Anchor','Image','Flash','Select','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','Table','Form']
;//
字符串数组,右键菜单的内容

FCKConfig.BrowserContextMenuOnCtrl = false ;

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'
;//
设置显示颜色拾取器时文字颜色列表

FCKConfig.FontNames       = '宋体;黑体;隶书;楷体_GB2312;Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana';//添加需要的中文字体

FCKConfig.FontSizes       = '1/xx-small;2/x-small;3/small;4/medium;5/large;6/x-large;7/xx-large' ;//字体大小中的字号列表

FCKConfig.FontFormats = 'p;div;pre;address;h1;h2;h3;h4;h5;h6' ;//设置显示在文字格式列表中的命名

FCKConfig.StylesXmlPath       = FCKConfig.EditorPath + 'fckstyles.xml' ;//
设置定义CSS样式列表的XML文件的位置

FCKConfig.TemplatesXmlPath = FCKConfig.EditorPath + 'fcktemplates.xml' ;

FCKConfig.SpellChecker        = 'ieSpell' ; // 'ieSpell' | 'SpellerPages'//
设置拼写检查器

FCKConfig.IeSpellDownloadUrl = 'http://www.iespell.com/download.php' ;//下载拼写检查器的网址

FCKConfig.SpellerPagesServerScript = 'server-scripts/spellchecker.php' ; // Available extension: .php .cfm .pl
FCKConfig.FirefoxSpellChecker = false ;

FCKConfig.MaxUndoLevels = 15 ;

FCKConfig.DisableObjectResizing = false ;
FCKConfig.DisableFFTableHandles = true ;

FCKConfig.LinkDlgHideTarget       = false ;
FCKConfig.LinkDlgHideAdvanced = false ;

FCKConfig.ImageDlgHideLink       = false ;
FCKConfig.ImageDlgHideAdvanced = false ;

FCKConfig.FlashDlgHideAdvanced = false ;

FCKConfig.ProtectedTags = '' ;

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

FCKConfig.DefaultLinkTarget = '' ;

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

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

// Don't care about the following line. It just calculates the correct connector
// extension to use for the default File Browser (Perl uses "cgi").
var _FileBrowserExtension = _FileBrowserLanguage == 'perl' ? 'cgi' : _FileBrowserLanguage ;

FCKConfig.LinkBrowser = false;//
是否允许在插入链接时浏览服务器

FCKConfig.LinkBrowserURL = FCKConfig.BasePath
+ 'filemanager/browser/default/browser.html?Connector=connectors/' +
_FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;//插入链接时浏览服务器的URL

FCKConfig.LinkBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ;       // 70%//
链接目标浏览器窗口高度

FCKConfig.LinkBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; // 70%

//
链接目标浏览器窗口宽度

FCKConfig.ImageBrowser = false;//
false表示关闭图片文件浏览服务器的功能

FCKConfig.ImageBrowserURL = FCKConfig.BasePath +
'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/'
+ _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;//浏览服务器时运行的URL

FCKConfig.ImageBrowserWindowWidth       = FCKConfig.ScreenWidth * 0.7 ; // 70% ;//图像浏览器窗口高度

FCKConfig.ImageBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; // 70% ;//图像浏览器窗口宽度

FCKConfig.FlashBrowser = false;//false表示关闭Flash浏览服务器的功能

FCKConfig.FlashBrowserURL = FCKConfig.BasePath +
'filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/'
+ _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;
FCKConfig.FlashBrowserWindowWidth       = FCKConfig.ScreenWidth * 0.7 ; //70% ;
FCKConfig.FlashBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; //70% ;

FCKConfig.LinkUpload = true ;//True表示开启文件上传的功能

FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/upload/' +
_QuickUploadLanguage + '/upload.' + _QuickUploadLanguage ;
FCKConfig.LinkUploadAllowedExtensions = "" ;        // empty for all
FCKConfig.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

FCKConfig.ImageUpload = true ;//True表示开启图片上传的功能

FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/upload/' +
_QuickUploadLanguage + '/upload.' + _QuickUploadLanguage +
'?Type=Image' ;
FCKConfig.ImageUploadAllowedExtensions = ".(jpg|gif|jpeg|png|bmp)$" ;       // empty for all
FCKConfig.ImageUploadDeniedExtensions = "" ;            // empty for no one

FCKConfig.FlashUpload = true ;//True表示开启Falsh上传的功能

FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/upload/' +
_QuickUploadLanguage + '/upload.' + _QuickUploadLanguage +
'?Type=Flash' ;
FCKConfig.FlashUploadAllowedExtensions = ".(swf|fla)$" ;       // empty for all
FCKConfig.FlashUploadDeniedExtensions = "" ;          // empty for no one

FCKConfig.SmileyPath = FCKConfig.BasePath + 'images/smiley/msn/' ;//图符文件夹路径

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']
;//
字符数组 图符窗中图片文件名数组

FCKConfig.SmileyColumns = 8 ;//
图符窗列数


FCKConfig.SmileyWindowWidth       = 320 ;//图符窗口宽度

FCKConfig.SmileyWindowHeight = 240 ;//图符窗口高度

【上篇】
【下篇】

抱歉!评论已关闭.