PageRenderTime 50ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/PlugNT_CMS_v3.7/PlugNT.Cms.Web/Tools/Editer/fck/fckconfig.js

http://fjaspx.codeplex.com
JavaScript | 319 lines | 200 code | 67 blank | 52 comment | 2 complexity | c28cbc95adca38d65b2084163cddb821 MD5 | raw file
Possible License(s): LGPL-2.1
  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. FCKConfig.CustomConfigurationsPath = '' ;
  27. FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ;
  28. FCKConfig.EditorAreaStyles = '' ;
  29. FCKConfig.ToolbarComboPreviewCSS = '' ;
  30. FCKConfig.DocType = '' ;
  31. FCKConfig.BaseHref = '' ;
  32. FCKConfig.FullPage = false ;
  33. // The following option determines whether the "Show Blocks" feature is enabled or not at startup.
  34. FCKConfig.StartupShowBlocks = false ;
  35. FCKConfig.Debug = false ;
  36. FCKConfig.AllowQueryStringDebug = true ;
  37. FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/office2003/'; //office2003,silver,default
  38. FCKConfig.SkinEditorCSS = '' ; // FCKConfig.SkinPath + "|<minified css>" ;
  39. FCKConfig.SkinDialogCSS = '' ; // FCKConfig.SkinPath + "|<minified css>" ;
  40. FCKConfig.PreloadImages = [ FCKConfig.SkinPath + 'images/toolbar.start.gif', FCKConfig.SkinPath + 'images/toolbar.buttonarrow.gif' ] ;
  41. FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/' ;
  42. // FCKConfig.Plugins.Add( 'autogrow' ) ;
  43. // FCKConfig.Plugins.Add( 'dragresizetable' );
  44. FCKConfig.AutoGrowMax = 400 ;
  45. // FCKConfig.ProtectedSource.Add( /<%[\s\S]*?%>/g ) ; // ASP style server side code <%...%>
  46. // FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ; // PHP style server side code
  47. // FCKConfig.ProtectedSource.Add( /(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi ) ; // ASP.Net style tags <asp:control>
  48. FCKConfig.AutoDetectLanguage = false ;
  49. FCKConfig.DefaultLanguage = 'zh-cn' ;
  50. FCKConfig.ContentLangDirection = 'ltr' ;
  51. FCKConfig.ProcessHTMLEntities = true ;
  52. FCKConfig.IncludeLatinEntities = true ;
  53. FCKConfig.IncludeGreekEntities = true ;
  54. FCKConfig.ProcessNumericEntities = false ;
  55. FCKConfig.AdditionalNumericEntities = '' ; // Single Quote: "'"
  56. FCKConfig.FillEmptyBlocks = true ;
  57. FCKConfig.FormatSource = true ;
  58. FCKConfig.FormatOutput = true ;
  59. FCKConfig.FormatIndentator = ' ' ;
  60. FCKConfig.EMailProtection = 'none' ; // none | encode | function
  61. FCKConfig.EMailProtectionFunction = 'mt(NAME,DOMAIN,SUBJECT,BODY)' ;
  62. FCKConfig.StartupFocus = false ;
  63. FCKConfig.ForcePasteAsPlainText = false ;
  64. FCKConfig.AutoDetectPasteFromWord = true ; // IE only.
  65. FCKConfig.ShowDropDialog = true ;
  66. FCKConfig.ForceSimpleAmpersand = false ;
  67. FCKConfig.TabSpaces = 0 ;
  68. FCKConfig.ShowBorders = true ;
  69. FCKConfig.SourcePopup = false ;
  70. FCKConfig.ToolbarStartExpanded = true ;
  71. FCKConfig.ToolbarCanCollapse = true ;
  72. FCKConfig.IgnoreEmptyParagraphValue = true ;
  73. FCKConfig.FloatingPanelsZIndex = 10000 ;
  74. FCKConfig.HtmlEncodeOutput = false ;
  75. FCKConfig.TemplateReplaceAll = true ;
  76. FCKConfig.TemplateReplaceCheckbox = true ;
  77. FCKConfig.ToolbarLocation = 'In' ;
  78. FCKConfig.ToolbarSets["Default"] = [
  79. ['Source','DocProps','-','Save','Preview','-','Templates','Cut','Copy','Paste','PasteText','PasteWord','Print','SpellCheck','Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat','Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
  80. ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','Link','Unlink','Anchor','-','MyImage','Flash','Table','Rule','Smiley','SpecialChar','PageBreak','TextColor','BGColor'],
  81. ['Style','FontFormat','FontName','FontSize','FitWindow','ShowBlocks']
  82. ] ;
  83. FCKConfig.ToolbarSets["Basic"] = [
  84. ['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','About']
  85. ] ;
  86. FCKConfig.ToolbarSets["CustomSimple"] = [
  87. ['Source','Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','Link','Unlink'],
  88. ['MyImage','FitWindow','ShowBlocks']
  89. ] ;
  90. FCKConfig.EnterMode = 'p' ; // p | div | br
  91. FCKConfig.ShiftEnterMode = 'br' ; // p | div | br
  92. FCKConfig.Keystrokes = [
  93. [ CTRL + 65 /*A*/, true ],
  94. [ CTRL + 67 /*C*/, true ],
  95. [ CTRL + 70 /*F*/, true ],
  96. [ CTRL + 83 /*S*/, true ],
  97. [ CTRL + 84 /*T*/, true ],
  98. [ CTRL + 88 /*X*/, true ],
  99. [ CTRL + 86 /*V*/, 'Paste' ],
  100. [ CTRL + 45 /*INS*/, true ],
  101. [ SHIFT + 45 /*INS*/, 'Paste' ],
  102. [ CTRL + 88 /*X*/, 'Cut' ],
  103. [ SHIFT + 46 /*DEL*/, 'Cut' ],
  104. [ CTRL + 90 /*Z*/, 'Undo' ],
  105. [ CTRL + 89 /*Y*/, 'Redo' ],
  106. [ CTRL + SHIFT + 90 /*Z*/, 'Redo' ],
  107. [ CTRL + 76 /*L*/, 'Link' ],
  108. [ CTRL + 66 /*B*/, 'Bold' ],
  109. [ CTRL + 73 /*I*/, 'Italic' ],
  110. [ CTRL + 85 /*U*/, 'Underline' ],
  111. [ CTRL + SHIFT + 83 /*S*/, 'Save' ],
  112. [ CTRL + ALT + 13 /*ENTER*/, 'FitWindow' ],
  113. [ SHIFT + 32 /*SPACE*/, 'Nbsp' ]
  114. ] ;
  115. FCKConfig.ContextMenu = ['Generic','Link','Anchor','Image','Flash','Select','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','Table','Form','DivContainer'] ;
  116. FCKConfig.BrowserContextMenuOnCtrl = false ;
  117. FCKConfig.BrowserContextMenu = false ;
  118. FCKConfig.EnableMoreFontColors = true ;
  119. 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' ;
  120. FCKConfig.FontFormats = 'p;h1;h2;h3;h4;h5;h6;pre;address;div' ;
  121. FCKConfig.FontNames = 'Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;
  122. FCKConfig.FontSizes = 'smaller;larger;xx-small;x-small;small;medium;large;x-large;xx-large' ;
  123. FCKConfig.StylesXmlPath = FCKConfig.EditorPath + 'fckstyles.xml' ;
  124. FCKConfig.TemplatesXmlPath = FCKConfig.EditorPath + 'fcktemplates.xml' ;
  125. FCKConfig.SpellChecker = 'WSC' ; // 'WSC' | 'SpellerPages' | 'ieSpell'
  126. FCKConfig.IeSpellDownloadUrl = 'http://www.iespell.com/download.php' ;
  127. FCKConfig.SpellerPagesServerScript = 'server-scripts/spellchecker.php' ; // Available extension: .php .cfm .pl
  128. FCKConfig.FirefoxSpellChecker = false ;
  129. FCKConfig.MaxUndoLevels = 15 ;
  130. FCKConfig.DisableObjectResizing = false ;
  131. FCKConfig.DisableFFTableHandles = true ;
  132. FCKConfig.LinkDlgHideTarget = false ;
  133. FCKConfig.LinkDlgHideAdvanced = false ;
  134. FCKConfig.ImageDlgHideLink = false ;
  135. FCKConfig.ImageDlgHideAdvanced = false ;
  136. FCKConfig.FlashDlgHideAdvanced = false ;
  137. FCKConfig.ProtectedTags = '' ;
  138. // This will be applied to the body element of the editor
  139. FCKConfig.BodyId = '' ;
  140. FCKConfig.BodyClass = '' ;
  141. FCKConfig.DefaultStyleLabel = '' ;
  142. FCKConfig.DefaultFontFormatLabel = '' ;
  143. FCKConfig.DefaultFontLabel = '' ;
  144. FCKConfig.DefaultFontSizeLabel = '' ;
  145. FCKConfig.DefaultLinkTarget = '' ;
  146. // The option switches between trying to keep the html structure or do the changes so the content looks like it was in Word
  147. FCKConfig.CleanWordKeepsStructure = false ;
  148. // Only inline elements are valid.
  149. FCKConfig.RemoveFormatTags = 'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var' ;
  150. // Attributes that will be removed
  151. FCKConfig.RemoveAttributes = 'class,style,lang,width,height,align,hspace,valign' ;
  152. FCKConfig.CustomStyles =
  153. {
  154. 'Red Title' : { Element : 'h3', Styles : { 'color' : 'Red' } }
  155. };
  156. // Do not add, rename or remove styles here. Only apply definition changes.
  157. FCKConfig.CoreStyles =
  158. {
  159. // Basic Inline Styles.
  160. 'Bold' : { Element : 'strong', Overrides : 'b' },
  161. 'Italic' : { Element : 'em', Overrides : 'i' },
  162. 'Underline' : { Element : 'u' },
  163. 'StrikeThrough' : { Element : 'strike' },
  164. 'Subscript' : { Element : 'sub' },
  165. 'Superscript' : { Element : 'sup' },
  166. // Basic Block Styles (Font Format Combo).
  167. 'p' : { Element : 'p' },
  168. 'div' : { Element : 'div' },
  169. 'pre' : { Element : 'pre' },
  170. 'address' : { Element : 'address' },
  171. 'h1' : { Element : 'h1' },
  172. 'h2' : { Element : 'h2' },
  173. 'h3' : { Element : 'h3' },
  174. 'h4' : { Element : 'h4' },
  175. 'h5' : { Element : 'h5' },
  176. 'h6' : { Element : 'h6' },
  177. // Other formatting features.
  178. 'FontFace' :
  179. {
  180. Element : 'span',
  181. Styles : { 'font-family' : '#("Font")' },
  182. Overrides : [ { Element : 'font', Attributes : { 'face' : null } } ]
  183. },
  184. 'Size' :
  185. {
  186. Element : 'span',
  187. Styles : { 'font-size' : '#("Size","fontSize")' },
  188. Overrides : [ { Element : 'font', Attributes : { 'size' : null } } ]
  189. },
  190. 'Color' :
  191. {
  192. Element : 'span',
  193. Styles : { 'color' : '#("Color","color")' },
  194. Overrides : [ { Element : 'font', Attributes : { 'color' : null } } ]
  195. },
  196. 'BackColor' : { Element : 'span', Styles : { 'background-color' : '#("Color","color")' } },
  197. 'SelectionHighlight' : { Element : 'span', Styles : { 'background-color' : 'navy', 'color' : 'white' } }
  198. };
  199. // The distance of an indentation step.
  200. FCKConfig.IndentLength = 40 ;
  201. FCKConfig.IndentUnit = 'px' ;
  202. // Alternatively, FCKeditor allows the use of CSS classes for block indentation.
  203. // This overrides the IndentLength/IndentUnit settings.
  204. FCKConfig.IndentClasses = [] ;
  205. // [ Left, Center, Right, Justified ]
  206. FCKConfig.JustifyClasses = [] ;
  207. // The following value defines which File Browser connector and Quick Upload
  208. // "uploader" to use. It is valid for the default implementaion and it is here
  209. // just to make this configuration file cleaner.
  210. // It is not possible to change this value using an external file or even
  211. // inline when creating the editor instance. In that cases you must set the
  212. // values of LinkBrowserURL, ImageBrowserURL and so on.
  213. // Custom implementations should just ignore it.
  214. var _FileBrowserLanguage = 'aspx' ; // asp | aspx | cfm | lasso | perl | php | py
  215. var _QuickUploadLanguage = 'aspx' ; // asp | aspx | cfm | lasso | perl | php | py
  216. // Don't care about the following two lines. It just calculates the correct connector
  217. // extension to use for the default File Browser (Perl uses "cgi").
  218. var _FileBrowserExtension = _FileBrowserLanguage == 'perl' ? 'cgi' : _FileBrowserLanguage ;
  219. var _QuickUploadExtension = _QuickUploadLanguage == 'perl' ? 'cgi' : _QuickUploadLanguage ;
  220. FCKConfig.LinkBrowser = false ;
  221. FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=' + encodeURIComponent( FCKConfig.BasePath + 'filemanager/connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ) ;
  222. FCKConfig.LinkBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; // 70%
  223. FCKConfig.LinkBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; // 70%
  224. FCKConfig.ImageBrowser = false ;
  225. FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=' + encodeURIComponent( FCKConfig.BasePath + 'filemanager/connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ) ;
  226. FCKConfig.ImageBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; // 70% ;
  227. FCKConfig.ImageBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; // 70% ;
  228. FCKConfig.FlashBrowser = false ;
  229. FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=' + encodeURIComponent( FCKConfig.BasePath + 'filemanager/connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ) ;
  230. FCKConfig.FlashBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; //70% ;
  231. FCKConfig.FlashBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; //70% ;
  232. FCKConfig.LinkUpload = false ;
  233. FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension ;
  234. 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
  235. FCKConfig.LinkUploadDeniedExtensions = "" ; // empty for no one
  236. FCKConfig.ImageUpload = false ;
  237. FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=Image' ;
  238. FCKConfig.ImageUploadAllowedExtensions = ".(jpg|gif|jpeg|png|bmp)$" ; // empty for all
  239. FCKConfig.ImageUploadDeniedExtensions = "" ; // empty for no one
  240. FCKConfig.FlashUpload = false ;
  241. FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=Flash' ;
  242. FCKConfig.FlashUploadAllowedExtensions = ".(swf|flv)$" ; // empty for all
  243. FCKConfig.FlashUploadDeniedExtensions = "" ; // empty for no one
  244. FCKConfig.SmileyPath = FCKConfig.BasePath + 'images/smiley/msn/' ;
  245. 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'] ;
  246. FCKConfig.SmileyColumns = 8 ;
  247. FCKConfig.SmileyWindowWidth = 320 ;
  248. FCKConfig.SmileyWindowHeight = 210 ;
  249. FCKConfig.BackgroundBlockerColor = '#ffffff' ;
  250. FCKConfig.BackgroundBlockerOpacity = 0.50 ;
  251. FCKConfig.MsWebBrowserControlCompat = false ;
  252. FCKConfig.PreventSubmitHandler = false ;