tableblockcontent.js 977 B

123456789101112131415161718192021222324252627282930
  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. ClassicEditor
  12. .create( document.querySelector( '#editor' ), {
  13. plugins: [ ArticlePluginSet, Table, TableToolbar, Alignment ],
  14. toolbar: [
  15. 'heading', '|', 'insertTable', '|', 'bold', 'italic', 'bulletedList', 'numberedList', 'blockQuote',
  16. 'alignment', '|', 'undo', 'redo'
  17. ],
  18. table: {
  19. contentToolbar: [ 'tableColumn', 'tableRow', 'mergeTableCells' ]
  20. }
  21. } )
  22. .then( editor => {
  23. window.editor = editor;
  24. } )
  25. .catch( err => {
  26. console.error( err.stack );
  27. } );