restricteddocument.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  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 '@ckeditor/ckeditor5-table/src/table';
  9. import RestrictedEditingException from '../../src/restrictededitingexception';
  10. ClassicEditor
  11. .create( document.querySelector( '#editor' ), {
  12. plugins: [ ArticlePluginSet, Table, RestrictedEditingException ],
  13. toolbar: [ 'heading', '|',
  14. 'bold', 'italic', 'link', '|',
  15. 'bulletedList', 'numberedList', 'blockQuote', 'insertTable', '|',
  16. 'nonRestricted', '|', 'undo', 'redo'
  17. ],
  18. image: {
  19. toolbar: [ 'imageStyle:full', 'imageStyle:side', '|', 'imageTextAlternative' ]
  20. },
  21. table: {
  22. contentToolbar: [
  23. 'tableColumn',
  24. 'tableRow',
  25. 'mergeTableCells'
  26. ]
  27. }
  28. } )
  29. .then( editor => {
  30. window.editor = editor;
  31. } )
  32. .catch( err => {
  33. console.error( err.stack );
  34. } );