basic-styles.js 562 B

123456789101112131415161718192021
  1. /**
  2. * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* global console:false */
  6. 'use strict';
  7. import ClassicEditor from '/ckeditor5/creator-classic/classic.js';
  8. ClassicEditor.create( document.querySelector( '#editor' ), {
  9. features: [ 'delete', 'enter', 'typing', 'paragraph', 'undo', 'basic-styles/bold', 'basic-styles/italic' ],
  10. toolbar: [ 'bold', 'italic', 'undo', 'redo' ]
  11. } )
  12. .then( editor => {
  13. window.editor = editor;
  14. } )
  15. .catch( err => {
  16. console.error( err.stack );
  17. } );