8
0

autoformat.js 1.2 KB

1234567891011121314151617181920212223242526272829
  1. /**
  2. * @license Copyright (c) 2003-2017, 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/classic';
  7. import Autoformat from '../../src/autoformat';
  8. import Enter from '@ckeditor/ckeditor5-enter/src/enter';
  9. import List from '@ckeditor/ckeditor5-list/src/list';
  10. import BlockQuote from '@ckeditor/ckeditor5-block-quote/src/blockquote';
  11. import Typing from '@ckeditor/ckeditor5-typing/src/typing';
  12. import Heading from '@ckeditor/ckeditor5-heading/src/heading';
  13. import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
  14. import Undo from '@ckeditor/ckeditor5-undo/src/undo';
  15. import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
  16. import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
  17. ClassicEditor.create( document.querySelector( '#editor' ), {
  18. plugins: [ Enter, Typing, Paragraph, Undo, Bold, Italic, Heading, List, Autoformat, BlockQuote ],
  19. toolbar: [ 'headings', 'numberedList', 'bulletedList', 'blockQuote', 'bold', 'italic', 'undo', 'redo' ]
  20. } )
  21. .then( editor => {
  22. window.editor = editor;
  23. } )
  24. .catch( err => {
  25. console.error( err.stack );
  26. } );