1.js 625 B

12345678910111213141516171819202122
  1. /**
  2. * @license Copyright (c) 2003-2016, 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/classic.js';
  7. import Typing from '/ckeditor5/typing/typing.js';
  8. import Paragraph from '/ckeditor5/paragraph/paragraph.js';
  9. import Bold from '/ckeditor5/basic-styles/bold.js';
  10. ClassicEditor.create( document.querySelector( '#editor' ), {
  11. features: [ Typing, Paragraph, Bold ],
  12. toolbar: [ 'bold' ]
  13. } )
  14. .then( editor => {
  15. window.editor = editor;
  16. } )
  17. .catch( err => {
  18. console.error( err.stack );
  19. } );