config_js.tpl 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /* Ckeditor global configuration file */
  2. CKEDITOR.editorConfig = function (config) {
  3. // Define changes to default configuration here.
  4. // For complete reference see:
  5. // http://docs.ckeditor.com/#!/api/CKEDITOR.config
  6. // Remove some buttons provided by the standard plugins, which are
  7. // not needed in the Standard(s) toolbar.
  8. //config.removeButtons = 'Underline,Subscript,Superscript';
  9. // Set the most common block elements.
  10. config.format_tags = 'p;h1;h2;h3;h4;h5;h6;pre';
  11. // Simplify the dialog windows.
  12. config.removeDialogTabs = 'image:advanced;link:advanced';
  13. config.templates_files = [
  14. '{{ _p.web_main ~ 'inc/lib/elfinder/templates.php'}}'
  15. ];
  16. //Style for default CKEditor Chamilo LMS
  17. config.stylesSet = [
  18. {
  19. name : 'Title 1',
  20. element : 'h1',
  21. attributes : { 'class': 'ck ck-title' }
  22. },
  23. {
  24. name : 'Title 2',
  25. element : 'h2',
  26. attributes : { 'class': 'ck ck-title2' }
  27. },
  28. {
  29. name : 'Title 3',
  30. element : 'h3',
  31. attributes : { 'class': 'ck ck-title3' }
  32. },
  33. {
  34. name : 'Alert Success',
  35. element : 'p',
  36. attributes : { 'class': 'alert alert-success' }
  37. },
  38. {
  39. name : 'Alert Info',
  40. element : 'p',
  41. attributes : { 'class': 'alert alert-info' }
  42. },
  43. {
  44. name : 'Alert Warning',
  45. element : 'p',
  46. attributes : { 'class': 'alert alert-warning' }
  47. },
  48. {
  49. name : 'Alert Danger',
  50. element : 'p',
  51. attributes : { 'class': 'alert alert-danger' }
  52. },
  53. {
  54. name : 'Section Article' ,
  55. element : 'h3' ,
  56. attributes : { 'class': 'ck ck-article' }
  57. }, {
  58. name : 'Paragraph box' ,
  59. element : 'p' ,
  60. attributes: { 'class': 'ck-paragraph-box' }
  61. }, {
  62. name : 'Superscript' ,
  63. element : 'sup'
  64. },
  65. {
  66. name : 'Subscript' ,
  67. element : 'sub'
  68. },
  69. {
  70. name : 'Strikethrough' ,
  71. element : 'del'
  72. },
  73. {
  74. name : 'Underlined' ,
  75. element : 'ins'
  76. },
  77. {
  78. name : 'Stand Out' ,
  79. element : 'span',
  80. attributes: { 'class':'ck-stand-out'}
  81. },
  82. {
  83. name : 'Separate Style 1' ,
  84. element : 'hr',
  85. attributes: { 'class':'ck-style1'}
  86. },
  87. {
  88. name : 'Separate Style 2' ,
  89. element : 'hr',
  90. attributes: { 'class':'ck-style2'}
  91. },
  92. {
  93. name : 'Separate Style 3' ,
  94. element : 'hr',
  95. attributes: { 'class':'ck-style3'}
  96. }
  97. ];
  98. {% if moreButtonsInMaximizedMode %}
  99. config.toolbar = 'minToolbar';
  100. config.smallToolbar = 'minToolbar';
  101. config.maximizedToolbar = 'maxToolbar';
  102. {% endif %}
  103. // File manager (elFinder)
  104. config.filebrowserBrowseUrl = '{{ _p.web_lib ~ 'elfinder/filemanager.php' }}';
  105. // Allows to use "class" attribute inside divs and spans.
  106. config.allowedContent = true;
  107. config.contentsCss = '{{ cssEditor }}';
  108. config.customConfig = '{{ _p.web_main ~ 'inc/lib/javascript/ckeditor/config_js.php'}}';
  109. };