config.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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.entities_greek = false;
  14. config.resize_enabled = false;
  15. //config.resize_maxHeight = 3000;
  16. //config.resize_maxWidth = 3000;
  17. //config.height = '300px';
  18. //config.resize_dir = 'vertical'; // horizontal, vertical, both
  19. config.removePlugins = 'elementspath,save'; // this list is modified into DolEditor::Create()
  20. //config.extraPlugins = 'docprops,scayt,showprotected';
  21. config.removeDialogTabs = 'flash:advanced'; // config.removeDialogTabs = 'flash:advanced;image:Link';
  22. config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // Prevent PHP Code to be formatted
  23. //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'
  24. //config.language = 'de';
  25. //config.defaultLanguage = 'en';
  26. //config.contentsLanguage = 'fr';
  27. config.fullPage = false; // Not a full html page string, just part of it
  28. config.dialog_backgroundCoverColor = 'rgb(255, 254, 253)';
  29. //config.contentsCss = '/css/mysitestyles.css';
  30. config.image_previewText=' '; // Must no be empty
  31. //config.autoParagraph = false;
  32. //config.removeFormatTags = 'b,big,code,del,dfn,em,font,i,ins,kbd'; // See also rules on this.dataProcessor.writer.setRules
  33. //config.forcePasteAsPlainText = true;
  34. config.toolbar_Full =
  35. [
  36. ['Templates','NewPage'],
  37. ['Save'],
  38. ['Maximize','Preview'],
  39. ['PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'], // 'Cut','Copy','Paste','-', are useless, can be done with right click, even on smarpthone
  40. ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
  41. ['CreateDiv','ShowBlocks'],
  42. ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
  43. ['Bold','Italic','Underline','Strike','Superscript'], // 'Subscript'
  44. ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
  45. ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
  46. ['BidiLtr', 'BidiRtl'],
  47. ['Link','Unlink'],
  48. ['Image','Table','HorizontalRule','Smiley'],
  49. ['Styles','Format','Font','FontSize'],
  50. ['TextColor','BGColor'],
  51. ['Source']
  52. ];
  53. // Used for mailing fields
  54. config.toolbar_dolibarr_mailings =
  55. [
  56. ['Maximize','Preview'],
  57. ['SpellChecker', 'Scayt'],
  58. ['Undo','Redo','-','Find','Replace'],
  59. ['CreateDiv','ShowBlocks'],
  60. ['Format','Font','FontSize'],
  61. ['Bold','Italic','Underline','Strike','-','TextColor','RemoveFormat'],
  62. ['NumberedList','BulletedList','Outdent','Indent'],
  63. ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
  64. ['Link','Unlink','Image','Table','HorizontalRule'],
  65. ['Source']
  66. ];
  67. // Used for notes fields
  68. config.toolbar_dolibarr_notes =
  69. [
  70. ['Maximize'],
  71. ['SpellChecker', 'Scayt'], // 'Cut','Copy','Paste','-', are useless, can be done with right click, even on smarpthone
  72. ['Undo','Redo','-','Find','Replace'],
  73. ['Format','Font','FontSize'],
  74. ['Bold','Italic','Underline','Strike','-','TextColor','RemoveFormat'],
  75. ['NumberedList','BulletedList','Outdent','Indent'],
  76. ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
  77. ['Link','Unlink','Image','Table','HorizontalRule'],
  78. ['Source']
  79. ];
  80. // Used for details lines
  81. config.toolbar_dolibarr_details =
  82. [
  83. ['Maximize'],
  84. ['SpellChecker', 'Scayt'], // 'Cut','Copy','Paste','-', are useless, can be done with right click, even on smarpthone
  85. ['Format','FontSize'],
  86. ['Bold','Italic','Underline','Strike','-','TextColor','RemoveFormat'], // ,'Subscript','Superscript' useless
  87. ['NumberedList','BulletedList','Outdent','Indent'],
  88. ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
  89. ['Link','Unlink'],
  90. ['Source']
  91. ];
  92. // Used for mailing fields
  93. config.toolbar_dolibarr_readonly =
  94. [
  95. ['Maximize'],
  96. ['Find'],
  97. ['Image'],
  98. ['Source']
  99. ];
  100. };