basic-styles.js 926 B

123456789101112131415161718192021222324252627
  1. /**
  2. * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* globals console:false, window, document */
  6. import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
  7. import Enter from '@ckeditor/ckeditor5-enter/src/enter';
  8. import Typing from '@ckeditor/ckeditor5-typing/src/typing';
  9. import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
  10. import Undo from '@ckeditor/ckeditor5-undo/src/undo';
  11. import Bold from '../../src/bold';
  12. import Italic from '../../src/italic';
  13. import Underline from '../../src/underline';
  14. ClassicEditor
  15. .create( document.querySelector( '#editor' ), {
  16. plugins: [ Enter, Typing, Paragraph, Undo, Bold, Italic, Underline ],
  17. toolbar: [ 'bold', 'italic', 'underline', 'undo', 'redo' ]
  18. } )
  19. .then( editor => {
  20. window.editor = editor;
  21. } )
  22. .catch( err => {
  23. console.error( err.stack );
  24. } );