8
0

basic-styles.js 975 B

12345678910111213141516171819202122232425262728
  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. import Code from '../../src/code';
  15. ClassicEditor
  16. .create( document.querySelector( '#editor' ), {
  17. plugins: [ Enter, Typing, Paragraph, Undo, Bold, Italic, Underline, Code ],
  18. toolbar: [ 'bold', 'italic', 'underline', 'code', 'undo', 'redo' ]
  19. } )
  20. .then( editor => {
  21. window.editor = editor;
  22. } )
  23. .catch( err => {
  24. console.error( err.stack );
  25. } );