1.js 907 B

1234567891011121314151617181920212223242526272829303132
  1. /**
  2. * @license Copyright (c) 2003-2020, 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. const config = {
  10. plugins: [ ArticlePluginSet ]
  11. };
  12. ClassicEditor
  13. .create( document.querySelector( '#editor-classic' ), config )
  14. .then( editor => {
  15. window.classicEditor = editor;
  16. } )
  17. .catch( err => {
  18. console.error( err.stack );
  19. } );
  20. BalloonEditor
  21. .create( document.querySelector( '#editor-balloon' ), config )
  22. .then( editor => {
  23. window.balloonEditor = editor;
  24. } )
  25. .catch( err => {
  26. console.error( err.stack );
  27. } );