inverted.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /**
  2. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* globals document, window, console */
  6. import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
  7. import BalloonEditor from '@ckeditor/ckeditor5-editor-balloon/src/ballooneditor';
  8. import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
  9. import Strikethrough from '@ckeditor/ckeditor5-basic-styles/src/strikethrough';
  10. import Code from '@ckeditor/ckeditor5-basic-styles/src/code';
  11. const config = {
  12. plugins: [ ArticlePluginSet, Strikethrough, Code ],
  13. toolbar: [ 'headings', '|', 'bold', 'italic', 'strikethrough', 'code', 'link', '|', 'undo', 'redo' ]
  14. };
  15. ClassicEditor
  16. .create( document.querySelector( '#editor-classic' ), config )
  17. .then( editor => {
  18. window.classicEditor = editor;
  19. } )
  20. .catch( err => {
  21. console.error( err.stack );
  22. } );
  23. BalloonEditor
  24. .create( document.querySelector( '#editor-balloon' ), config )
  25. .then( editor => {
  26. window.balloonEditor = editor;
  27. } )
  28. .catch( err => {
  29. console.error( err.stack );
  30. } );