basic-styles.js 615 B

12345678910111213141516171819202122232425
  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 CKEDITOR from '/ckeditor.js';
  8. import ClassicCreator from '/ckeditor5/creator-classic/classiccreator.js';
  9. import Bold from '/ckeditor5/basic-styles/bold.js';
  10. import Italic from '/ckeditor5/basic-styles/italic.js';
  11. CKEDITOR.create( '#editor1', {
  12. creator: ClassicCreator,
  13. features: [ Bold, Italic ],
  14. toolbar: [ 'bold', 'italic' ]
  15. } )
  16. .then( editor => {
  17. window.editor = editor;
  18. } )
  19. .catch( err => {
  20. console.error( err.stack );
  21. } );