ckeditor.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /**
  2. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. import DecoupledEditorBase from '@ckeditor/ckeditor5-editor-decoupled/src/decouplededitor';
  6. import EssentialsPlugin from '@ckeditor/ckeditor5-essentials/src/essentials';
  7. import AlignmentPlugin from '@ckeditor/ckeditor5-alignment/src/alignment';
  8. import FontsizePlugin from '@ckeditor/ckeditor5-font/src/fontsize';
  9. import FontfamilyPlugin from '@ckeditor/ckeditor5-font/src/fontfamily';
  10. import HighlightPlugin from '@ckeditor/ckeditor5-highlight/src/highlight';
  11. import UploadadapterPlugin from '@ckeditor/ckeditor5-adapter-ckfinder/src/uploadadapter';
  12. import AutoformatPlugin from '@ckeditor/ckeditor5-autoformat/src/autoformat';
  13. import BoldPlugin from '@ckeditor/ckeditor5-basic-styles/src/bold';
  14. import ItalicPlugin from '@ckeditor/ckeditor5-basic-styles/src/italic';
  15. import StrikethroughPlugin from '@ckeditor/ckeditor5-basic-styles/src/strikethrough';
  16. import UnderlinePlugin from '@ckeditor/ckeditor5-basic-styles/src/underline';
  17. import BlockquotePlugin from '@ckeditor/ckeditor5-block-quote/src/blockquote';
  18. import EasyimagePlugin from '@ckeditor/ckeditor5-easy-image/src/easyimage';
  19. import HeadingPlugin from '@ckeditor/ckeditor5-heading/src/heading';
  20. import ImagePlugin from '@ckeditor/ckeditor5-image/src/image';
  21. import ImagecaptionPlugin from '@ckeditor/ckeditor5-image/src/imagecaption';
  22. import ImagestylePlugin from '@ckeditor/ckeditor5-image/src/imagestyle';
  23. import ImagetoolbarPlugin from '@ckeditor/ckeditor5-image/src/imagetoolbar';
  24. import ImageuploadPlugin from '@ckeditor/ckeditor5-image/src/imageupload';
  25. import LinkPlugin from '@ckeditor/ckeditor5-link/src/link';
  26. import ListPlugin from '@ckeditor/ckeditor5-list/src/list';
  27. import ParagraphPlugin from '@ckeditor/ckeditor5-paragraph/src/paragraph';
  28. export default class DecoupledEditor extends DecoupledEditorBase {}
  29. DecoupledEditor.build = {
  30. plugins: [
  31. EssentialsPlugin,
  32. AlignmentPlugin,
  33. FontsizePlugin,
  34. FontfamilyPlugin,
  35. HighlightPlugin,
  36. UploadadapterPlugin,
  37. AutoformatPlugin,
  38. BoldPlugin,
  39. ItalicPlugin,
  40. StrikethroughPlugin,
  41. UnderlinePlugin,
  42. BlockquotePlugin,
  43. EasyimagePlugin,
  44. HeadingPlugin,
  45. ImagePlugin,
  46. ImagecaptionPlugin,
  47. ImagestylePlugin,
  48. ImagetoolbarPlugin,
  49. ImageuploadPlugin,
  50. LinkPlugin,
  51. ListPlugin,
  52. ParagraphPlugin
  53. ],
  54. config: {
  55. toolbar: {
  56. items: [
  57. 'heading',
  58. '|',
  59. 'fontsize',
  60. 'fontfamily',
  61. '|',
  62. 'bold',
  63. 'italic',
  64. 'underline',
  65. 'strikethrough',
  66. 'highlight',
  67. '|',
  68. 'alignment',
  69. '|',
  70. 'numberedList',
  71. 'bulletedList',
  72. '|',
  73. 'link',
  74. 'blockquote',
  75. 'imageUpload',
  76. '|',
  77. 'undo',
  78. 'redo'
  79. ]
  80. },
  81. image: {
  82. styles: [
  83. 'full',
  84. 'alignLeft',
  85. 'alignRight'
  86. ],
  87. toolbar: [
  88. 'imageStyle:alignLeft',
  89. 'imageStyle:full',
  90. 'imageStyle:alignRight',
  91. '|',
  92. 'imageTextAlternative'
  93. ]
  94. },
  95. language: 'en'
  96. }
  97. };