clipboard-integration.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  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/classiceditor';
  7. import Typing from '@ckeditor/ckeditor5-typing/src/typing';
  8. import Paragraph from '../../src/paragraph';
  9. import Undo from '@ckeditor/ckeditor5-undo/src/undo';
  10. import Enter from '@ckeditor/ckeditor5-enter/src/enter';
  11. import Clipboard from '@ckeditor/ckeditor5-clipboard/src/clipboard';
  12. import Link from '@ckeditor/ckeditor5-link/src/link';
  13. import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
  14. import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
  15. ClassicEditor.create( document.querySelector( '#editor' ), {
  16. plugins: [
  17. Typing,
  18. Paragraph,
  19. Undo,
  20. Enter,
  21. Clipboard,
  22. Link,
  23. Bold,
  24. Italic
  25. ],
  26. toolbar: [ 'bold', 'italic', 'link', 'undo', 'redo' ]
  27. } )
  28. .then( editor => {
  29. window.editor = editor;
  30. } )
  31. .catch( err => {
  32. console.error( err.stack );
  33. } );