config.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /*
  2. Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
  3. For licensing, see LICENSE.html or http://ckeditor.com/license
  4. */
  5. CKEDITOR.editorConfig = function( config )
  6. {
  7. // Define changes to default configuration here.
  8. // http://docs.cksource.com/CKEditor_3.x/Developers_Guide
  9. // http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html
  10. config.enterMode = CKEDITOR.ENTER_BR;
  11. //config.forceSimpleAmpersand = true; // When you put a <img src="x?a=a&b=b"> into the textarea, and go into "source", then ckeditor change the & into &amp;. We don't want this. But this option does not fix this.
  12. //config.entities = false; // When you put a <img src="x?a=a&b=b"> into the textarea, and go into "source", then ckeditor change the & into &amp;. We don't want this. But this option does not fix this.
  13. config.resize_enabled = false;
  14. //config.resize_maxHeight = 3000;
  15. //config.resize_maxWidth = 3000;
  16. //config.height = '300px';
  17. //config.resize_dir = 'vertical'; // horizontal, vertical, both
  18. config.removePlugins = 'elementspath,save'; // config.removePlugins = 'elementspath,save,font';
  19. //config.extraPlugins = 'docprops,scayt,showprotected';
  20. config.removeDialogTabs = 'flash:advanced'; // config.removeDialogTabs = 'flash:advanced;image:Link';
  21. config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // Prevent PHP Code to be formatted
  22. //config.menu_groups = 'clipboard,table,anchor,link,image'; // for context menu 'clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea'
  23. //config.language = 'de';
  24. //config.defaultLanguage = 'en';
  25. //config.contentsLanguage = 'fr';
  26. config.fullPage = false; // Not a full html page string, just part of it
  27. config.dialog_backgroundCoverColor = 'rgb(255, 254, 253)';
  28. //config.contentsCss = '/css/mysitestyles.css';
  29. config.image_previewText=' '; // Must no be empty
  30. //config.autoParagraph = false;
  31. //config.removeFormatTags = 'b,big,code,del,dfn,em,font,i,ins,kbd'; // See also rules on this.dataProcessor.writer.setRules
  32. //config.forcePasteAsPlainText = true;
  33. config.toolbar_Full =
  34. [
  35. ['Templates','NewPage'],
  36. ['Save'],
  37. ['Maximize','Preview'],
  38. ['PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'], // 'Cut','Copy','Paste','-', are useless, can be done with right click, even on smarpthone
  39. ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
  40. ['CreateDiv','ShowBlocks'],
  41. ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
  42. ['Bold','Italic','Underline','Strike','Superscript'], // 'Subscript'
  43. ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
  44. ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
  45. ['BidiLtr', 'BidiRtl'],
  46. ['Link','Unlink','Anchor'],
  47. ['Image','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'],
  48. ['Styles','Format','Font','FontSize'],
  49. ['TextColor','BGColor'],
  50. ['Source']
  51. ];
  52. // Used for mailing fields
  53. config.toolbar_dolibarr_mailings =
  54. [
  55. ['Maximize','Preview'],
  56. ['SpellChecker', 'Scayt'],
  57. ['Undo','Redo','-','Find','Replace'],
  58. ['CreateDiv','ShowBlocks'],
  59. ['Format','Font','FontSize'],
  60. ['Bold','Italic','Underline','Strike','Superscript','-','TextColor','RemoveFormat'],
  61. ['NumberedList','BulletedList','Outdent','Indent'],
  62. ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
  63. ['Link','Unlink','Anchor','Image','Table','HorizontalRule','SpecialChar'],
  64. ['Source']
  65. ];
  66. // Used for notes fields
  67. config.toolbar_dolibarr_notes =
  68. [
  69. ['Maximize'],
  70. ['SpellChecker', 'Scayt'], // 'Cut','Copy','Paste','-', are useless, can be done with right click, even on smarpthone
  71. ['Undo','Redo','-','Find','Replace'],
  72. ['Format','Font','FontSize'],
  73. ['Bold','Italic','Underline','Strike','Superscript','-','TextColor','RemoveFormat'],
  74. ['NumberedList','BulletedList','Outdent','Indent'],
  75. ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
  76. ['Link','Unlink','Image','Table','HorizontalRule','SpecialChar'],
  77. ['Source']
  78. ];
  79. // Used for details lines
  80. config.toolbar_dolibarr_details =
  81. [
  82. ['Maximize'],
  83. ['SpellChecker', 'Scayt'], // 'Cut','Copy','Paste','-', are useless, can be done with right click, even on smarpthone
  84. ['Format','FontSize'],
  85. ['Bold','Italic','Underline','Strike','-','TextColor','RemoveFormat'], // ,'Subscript','Superscript' useless
  86. ['NumberedList','BulletedList','Outdent','Indent'],
  87. ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
  88. ['Link','Unlink','SpecialChar'],
  89. ['Source']
  90. ];
  91. // Used for mailing fields
  92. config.toolbar_dolibarr_readonly =
  93. [
  94. ['Maximize'],
  95. ['Find'],
  96. ['Source']
  97. ];
  98. };