PageRenderTime 52ms CodeModel.GetById 25ms RepoModel.GetById 1ms app.codeStats 0ms

/fckeditor/fckconfig.js

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