selection.js 747 B

1234567891011121314151617181920212223
  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, document, window */
  6. import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
  7. import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
  8. import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
  9. import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials';
  10. ClassicEditor
  11. .create( document.querySelector( '#editor' ), {
  12. plugins: [ Essentials, Paragraph, Bold ],
  13. toolbar: [ 'bold' ]
  14. } )
  15. .then( editor => {
  16. window.editor = editor;
  17. } )
  18. .catch( err => {
  19. console.error( err.stack );
  20. } );