fckconfig.js 12 KB

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