inverted.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /**
  2. * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  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. import Highlight from '@ckeditor/ckeditor5-highlight/src/highlight';
  12. const config = {
  13. plugins: [ ArticlePluginSet, Strikethrough, Code, Highlight ],
  14. toolbar: [ 'heading', '|', 'bold', 'italic', 'strikethrough', 'code', 'link', '|', 'highlight', '|', 'undo', 'redo' ]
  15. };
  16. ClassicEditor
  17. .create( document.querySelector( '#editor-classic' ), config )
  18. .then( editor => {
  19. window.classicEditor = editor;
  20. } )
  21. .catch( err => {
  22. console.error( err.stack );
  23. } );
  24. BalloonEditor
  25. .create( document.querySelector( '#editor-balloon' ), config )
  26. .then( editor => {
  27. window.balloonEditor = editor;
  28. } )
  29. .catch( err => {
  30. console.error( err.stack );
  31. } );