PageRenderTime 39ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/sop/rc1/Tpl/default/Public/Js/FCKeditor/fckconfig.js

http://iiccms.googlecode.com/
JavaScript | 227 lines | 135 code | 47 blank | 45 comment | 1 complexity | cf3c8a21cc14ebaeb534737fe819a6a2 MD5 | raw file
Possible License(s): Apache-2.0, BSD-3-Clause, LGPL-2.1
  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. * File Name: fckconfig.js
  22. * Editor configuration settings.
  23. *
  24. * Follow this link for more information:
  25. * http://wiki.fckeditor.net/Developer%27s_Guide/Configuration/Configurations_Settings
  26. *
  27. * File Authors:
  28. * Frederico Caldeira Knabben (www.fckeditor.net)
  29. */
  30. // Disable the custom Enter Key Handler (this configuration will be removed in
  31. // version 2.5).
  32. FCKConfig.DisableEnterKeyHandler = false ;
  33. FCKConfig.CustomConfigurationsPath = '' ;
  34. FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ;
  35. FCKConfig.ToolbarComboPreviewCSS = '' ;
  36. FCKConfig.DocType = '' ;
  37. FCKConfig.BaseHref = '' ;
  38. FCKConfig.FullPage = false ;
  39. FCKConfig.Debug = false ;
  40. FCKConfig.AllowQueryStringDebug = true ;
  41. FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/' ;
  42. FCKConfig.PreloadImages = [ FCKConfig.SkinPath + 'images/toolbar.start.gif', FCKConfig.SkinPath + 'images/toolbar.buttonarrow.gif' ] ;
  43. FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/' ;
  44. // FCKConfig.Plugins.Add( 'autogrow' ) ;
  45. FCKConfig.AutoGrowMax = 400 ;
  46. // FCKConfig.ProtectedSource.Add( /<%[\s\S]*?%>/g ) ; // ASP style server side code <%...%>
  47. // FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ; // PHP style server side code
  48. // FCKConfig.ProtectedSource.Add( /(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi ) ; // ASP.Net style tags <asp:control>
  49. FCKConfig.AutoDetectLanguage = true ;
  50. FCKConfig.DefaultLanguage = 'zh-cn' ;
  51. FCKConfig.ContentLangDirection = 'ltr' ;
  52. FCKConfig.ProcessHTMLEntities = true ;
  53. FCKConfig.IncludeLatinEntities = true ;
  54. FCKConfig.IncludeGreekEntities = true ;
  55. FCKConfig.ProcessNumericEntities = false ;
  56. FCKConfig.AdditionalNumericEntities = '' ; // Single Quote: "'"
  57. FCKConfig.FillEmptyBlocks = true ;
  58. FCKConfig.FormatSource = true ;
  59. FCKConfig.FormatOutput = true ;
  60. FCKConfig.FormatIndentator = ' ' ;
  61. FCKConfig.ForceStrongEm = true ;
  62. FCKConfig.GeckoUseSPAN = false ;
  63. FCKConfig.StartupFocus = false ;
  64. FCKConfig.ForcePasteAsPlainText = false ;
  65. FCKConfig.AutoDetectPasteFromWord = true ; // IE only.
  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.PreserveSessionOnFileBrowser = false ;
  74. FCKConfig.FloatingPanelsZIndex = 10000 ;
  75. FCKConfig.TemplateReplaceAll = true ;
  76. FCKConfig.TemplateReplaceCheckbox = true ;
  77. FCKConfig.ToolbarLocation = 'In' ;
  78. FCKConfig.ToolbarSets["Default"] = [
  79. ['Source','DocProps','-','Save','NewPage','Preview','-','Templates'],
  80. ['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
  81. ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
  82. ['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
  83. '/',
  84. ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
  85. ['OrderedList','UnorderedList','-','Outdent','Indent'],
  86. ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
  87. ['Link','Unlink','Anchor'],
  88. ['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'],
  89. '/',
  90. ['Style','FontFormat','FontName','FontSize'],
  91. ['TextColor','BGColor'],
  92. ['FitWindow','-','About']
  93. ] ;
  94. FCKConfig.ToolbarSets["Basic"] = [
  95. ['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','About']
  96. ] ;
  97. FCKConfig.EnterMode = 'p' ; // p | div | br
  98. FCKConfig.ShiftEnterMode = 'br' ; // p | div | br
  99. FCKConfig.Keystrokes = [
  100. [ CTRL + 65 /*A*/, true ],
  101. [ CTRL + 67 /*C*/, true ],
  102. [ CTRL + 88 /*X*/, true ],
  103. [ CTRL + 86 /*V*/, 'Paste' ],
  104. [ SHIFT + 45 /*INS*/, 'Paste' ],
  105. [ CTRL + 90 /*Z*/, 'Undo' ],
  106. [ CTRL + 89 /*Y*/, 'Redo' ],
  107. [ CTRL + SHIFT + 90 /*Z*/, 'Redo' ],
  108. [ CTRL + 76 /*L*/, 'Link' ],
  109. [ CTRL + 66 /*B*/, 'Bold' ],
  110. [ CTRL + 73 /*I*/, 'Italic' ],
  111. [ CTRL + 85 /*U*/, 'Underline' ],
  112. [ CTRL + ALT + 83 /*S*/, 'Save' ],
  113. [ CTRL + ALT + 13 /*ENTER*/, 'FitWindow' ],
  114. [ CTRL + 9 /*TAB*/, 'Source' ]
  115. ] ;
  116. FCKConfig.ContextMenu = ['Generic','Link','Anchor','Image','Flash','Select','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','Table','Form'] ;
  117. 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' ;
  118. FCKConfig.FontNames = 'Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;
  119. FCKConfig.FontSizes = '1/xx-small;2/x-small;3/small;4/medium;5/large;6/x-large;7/xx-large' ;
  120. FCKConfig.FontFormats = 'p;div;pre;address;h1;h2;h3;h4;h5;h6' ;
  121. FCKConfig.StylesXmlPath = FCKConfig.EditorPath + 'fckstyles.xml' ;
  122. FCKConfig.TemplatesXmlPath = FCKConfig.EditorPath + 'fcktemplates.xml' ;
  123. FCKConfig.SpellChecker = 'ieSpell' ; // 'ieSpell' | 'SpellerPages'
  124. FCKConfig.IeSpellDownloadUrl = 'http://wcarchive.cdrom.com/pub/simtelnet/handheld/webbrow1/ieSpellSetup240428.exe' ;
  125. FCKConfig.SpellerPagesServerScript = 'server-scripts/spellchecker.php' ; // Available extension: .php .cfm .pl
  126. FCKConfig.MaxUndoLevels = 15 ;
  127. FCKConfig.DisableObjectResizing = false ;
  128. FCKConfig.DisableFFTableHandles = true ;
  129. FCKConfig.LinkDlgHideTarget = false ;
  130. FCKConfig.LinkDlgHideAdvanced = false ;
  131. FCKConfig.ImageDlgHideLink = false ;
  132. FCKConfig.ImageDlgHideAdvanced = false ;
  133. FCKConfig.FlashDlgHideAdvanced = false ;
  134. FCKConfig.ProtectedTags = '' ;
  135. // This will be applied to the body element of the editor
  136. FCKConfig.BodyId = '' ;
  137. FCKConfig.BodyClass = '' ;
  138. // The option switches between trying to keep the html structure or do the changes so the content looks like it was in Word
  139. FCKConfig.CleanWordKeepsStructure = false ;
  140. // The following value defines which File Browser connector and Quick Upload
  141. // "uploader" to use. It is valid for the default implementaion and it is here
  142. // just to make this configuration file cleaner.
  143. // It is not possible to change this value using an external file or even
  144. // inline when creating the editor instance. In that cases you must set the
  145. // values of LinkBrowserURL, ImageBrowserURL and so on.
  146. // Custom implementations should just ignore it.
  147. var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py
  148. var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | php
  149. // Don't care about the following line. It just calculates the correct connector
  150. // extension to use for the default File Browser (Perl uses "cgi").
  151. var _FileBrowserExtension = _FileBrowserLanguage == 'perl' ? 'cgi' : _FileBrowserLanguage ;
  152. FCKConfig.LinkBrowser = true ;
  153. FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;
  154. FCKConfig.LinkBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; // 70%
  155. FCKConfig.LinkBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; // 70%
  156. FCKConfig.ImageBrowser = true ;
  157. FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;
  158. FCKConfig.ImageBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; // 70% ;
  159. FCKConfig.ImageBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; // 70% ;
  160. FCKConfig.FlashBrowser = true ;
  161. FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;
  162. FCKConfig.FlashBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; //70% ;
  163. FCKConfig.FlashBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; //70% ;
  164. FCKConfig.LinkUpload = true ;
  165. FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/upload/' + _QuickUploadLanguage + '/upload.' + _QuickUploadLanguage ;
  166. FCKConfig.LinkUploadAllowedExtensions = "" ; // empty for all
  167. 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)$" ; // empty for no one
  168. FCKConfig.ImageUpload = true ;
  169. FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/upload/' + _QuickUploadLanguage + '/upload.' + _QuickUploadLanguage + '?Type=Image' ;
  170. FCKConfig.ImageUploadAllowedExtensions = ".(jpg|gif|jpeg|png|bmp)$" ; // empty for all
  171. FCKConfig.ImageUploadDeniedExtensions = ".(asp|jsp|php|js)$" ; // empty for no one
  172. FCKConfig.FlashUpload = true ;
  173. FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/upload/' + _QuickUploadLanguage + '/upload.' + _QuickUploadLanguage + '?Type=Flash' ;
  174. FCKConfig.FlashUploadAllowedExtensions = ".(swf|fla)$" ; // empty for all
  175. FCKConfig.FlashUploadDeniedExtensions = "" ; // empty for no one
  176. FCKConfig.SmileyPath = FCKConfig.BasePath + 'images/smiley/msn/' ;
  177. 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'] ;
  178. FCKConfig.SmileyColumns = 8 ;
  179. FCKConfig.SmileyWindowWidth = 320 ;
  180. FCKConfig.SmileyWindowHeight = 240 ;