essentials.js 740 B

123456789101112131415161718192021222324
  1. /**
  2. * @license Copyright (c) 2003-2020, 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 Essentials from '../../src/essentials';
  8. import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
  9. // Note: We need to load paragraph because we don't have inline editors yet.
  10. ClassicEditor
  11. .create( document.querySelector( '#editor' ), {
  12. plugins: [ Essentials, Paragraph ],
  13. toolbar: [ 'undo', 'redo' ]
  14. } )
  15. .then( editor => {
  16. window.editor = editor;
  17. } )
  18. .catch( err => {
  19. console.error( err.stack );
  20. } );