8
0

tableblockcontent.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /**
  2. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* globals console, window, document */
  6. import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
  7. import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
  8. import Table from '../../src/table';
  9. import TableToolbar from '../../src/tabletoolbar';
  10. import Alignment from '@ckeditor/ckeditor5-alignment/src/alignment';
  11. import ImageCaption from '@ckeditor/ckeditor5-image/src/imagecaption';
  12. import ImageStyle from '@ckeditor/ckeditor5-image/src/imagestyle';
  13. import Image from '@ckeditor/ckeditor5-image/src/image';
  14. ClassicEditor
  15. .create( document.querySelector( '#editor' ), {
  16. plugins: [ ArticlePluginSet, Table, TableToolbar, Alignment, Image, ImageCaption, ImageStyle ],
  17. toolbar: [
  18. 'heading', '|', 'insertTable', '|', 'bold', 'italic', 'bulletedList', 'numberedList', 'blockQuote',
  19. 'alignment', '|', 'undo', 'redo'
  20. ],
  21. image: {
  22. toolbar: [ 'imageStyle:full', 'imageStyle:side', '|', 'imageTextAlternative' ]
  23. },
  24. table: {
  25. toolbar: [ 'tableColumn', 'tableRow', 'mergeTableCells' ]
  26. }
  27. } )
  28. .then( editor => {
  29. window.editor = editor;
  30. } )
  31. .catch( err => {
  32. console.error( err.stack );
  33. } );