heading.js 752 B

123456789101112131415161718192021222324
  1. /**
  2. * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* globals console, document, window */
  6. import ClassicEditor from 'ckeditor5-editor-classic/src/classic';
  7. import Enter from 'ckeditor5-enter/src/enter';
  8. import Typing from 'ckeditor5-typing/src/typing';
  9. import Heading from 'ckeditor5-heading/src/heading';
  10. import Paragraph from 'ckeditor5-paragraph/src/paragraph';
  11. import Undo from 'ckeditor5-undo/src/undo';
  12. ClassicEditor.create( document.querySelector( '#editor' ), {
  13. plugins: [ Enter, Typing, Undo, Heading, Paragraph ],
  14. toolbar: [ 'headings', 'undo', 'redo' ]
  15. } )
  16. .then( editor => {
  17. window.editor = editor;
  18. } )
  19. .catch( err => {
  20. console.error( err.stack );
  21. } );