table.js 876 B

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