ckeditor.config.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
  3. For licensing, see LICENSE.html or http://ckeditor.com/license
  4. */
  5. /*
  6. WARNING: clear browser's cache after you modify this file.
  7. If you don't do this, you may notice that browser is ignoring all your changes.
  8. */
  9. CKEDITOR.editorConfig = function(config) {
  10. config.indentClasses = [ 'rteindent1', 'rteindent2', 'rteindent3', 'rteindent4' ];
  11. // [ Left, Center, Right, Justified ]
  12. config.justifyClasses = [ 'rteleft', 'rtecenter', 'rteright', 'rtejustify' ];
  13. // The minimum editor width, in pixels, when resizing it with the resize handle.
  14. config.resize_minWidth = 450;
  15. // Protect PHP code tags (<?...?>) so CKEditor will not break them when
  16. // switching from Source to WYSIWYG.
  17. // Uncommenting this line doesn't mean the user will not be able to type PHP
  18. // code in the source. This kind of prevention must be done in the server
  19. // side
  20. // (as does Drupal), so just leave this line as is.
  21. config.protectedSource.push(/<\?[\s\S]*?\?>/g); // PHP Code
  22. // [#1762328] Uncomment the line below to protect <code> tags in CKEditor (hide them in wysiwyg mode).
  23. // config.protectedSource.push(/<code>[\s\S]*?<\/code>/gi);
  24. config.extraPlugins = '';
  25. /*
  26. * Append here extra CSS rules that should be applied into the editing area.
  27. * Example:
  28. * config.extraCss = 'body {color:#FF0000;}';
  29. */
  30. config.extraCss = '';
  31. /**
  32. * Sample extraCss code for the "marinelli" theme.
  33. */
  34. if (Drupal.settings.ckeditor.theme == "marinelli") {
  35. config.extraCss += "body{background:#FFF;text-align:left;font-size:0.8em;}";
  36. config.extraCss += "#primary ol, #primary ul{margin:10px 0 10px 25px;}";
  37. }
  38. if (Drupal.settings.ckeditor.theme == "newsflash") {
  39. config.extraCss = "body{min-width:400px}";
  40. }
  41. /**
  42. * CKEditor's editing area body ID & class.
  43. * See http://drupal.ckeditor.com/tricks
  44. * This setting can be used if CKEditor does not work well with your theme by default.
  45. */
  46. config.bodyClass = '';
  47. config.bodyId = '';
  48. /**
  49. * Sample bodyClass and BodyId for the "marinelli" theme.
  50. */
  51. if (Drupal.settings.ckeditor.theme == "marinelli") {
  52. config.bodyClass = 'singlepage';
  53. config.bodyId = 'primary';
  54. }
  55. }
  56. /*
  57. * Sample toolbars
  58. */
  59. //Toolbar definition for basic buttons
  60. Drupal.settings.cke_toolbar_DrupalBasic = [ [ 'Format', 'Bold', 'Italic', '-', 'NumberedList','BulletedList', '-', 'Link', 'Unlink', 'Image' ] ];
  61. //Toolbar definition for Advanced buttons
  62. Drupal.settings.cke_toolbar_DrupalAdvanced = [
  63. ['Source'],
  64. ['Cut','Copy','Paste','PasteText','PasteFromWord','-','SpellChecker', 'Scayt'],
  65. ['Undo','Redo','Find','Replace','-','SelectAll'],
  66. ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar'],
  67. ['Maximize', 'ShowBlocks'],
  68. '/',
  69. ['Format'],
  70. ['Bold','Italic','Underline','Strike','-','Subscript','Superscript','-','RemoveFormat'],
  71. ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
  72. ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl'],
  73. ['Link','Unlink','Anchor','Linkit','LinkToNode','LinkToMenu']
  74. ];
  75. // Toolbar definition for all buttons
  76. Drupal.settings.cke_toolbar_DrupalFull = [
  77. ['Source'],
  78. ['Cut','Copy','Paste','PasteText','PasteFromWord','-','SpellChecker', 'Scayt'],
  79. ['Undo','Redo','Find','Replace','-','SelectAll'],
  80. ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','Iframe'],
  81. '/',
  82. ['Bold','Italic','Underline','Strike','-','Subscript','Superscript','-','RemoveFormat'],
  83. ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
  84. ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl','-','Language'],
  85. ['Link','Unlink','Anchor','Linkit','LinkToNode', 'LinkToMenu'],
  86. '/',
  87. ['Format','Font','FontSize'],
  88. ['TextColor','BGColor'],
  89. ['Maximize', 'ShowBlocks'],
  90. ['DrupalBreak', 'DrupalPageBreak']
  91. ];