pasting.js 662 B

123456789101112131415161718192021222324252627282930
  1. /**
  2. * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* globals console, window, document */
  6. import ClassicEditor from '/ckeditor5/editor-classic/classic.js';
  7. ClassicEditor.create( document.querySelector( '#editor' ), {
  8. features: [
  9. 'typing',
  10. 'paragraph',
  11. 'undo',
  12. 'enter',
  13. 'clipboard',
  14. 'link',
  15. 'list',
  16. 'heading',
  17. 'basic-styles/bold',
  18. 'basic-styles/italic'
  19. ],
  20. toolbar: [ 'headings', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'undo', 'redo' ]
  21. } )
  22. .then( editor => {
  23. window.editor = editor;
  24. } )
  25. .catch( err => {
  26. console.error( err.stack );
  27. } );