ckeditor-cjs-version.js 618 B

12345678910111213141516171819
  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. /* eslint-env commonjs */
  6. /* globals window, document, console */
  7. const DecoupledEditor = require( '../../build/ckeditor' );
  8. DecoupledEditor.create( document.querySelector( '#editor' ) )
  9. .then( editor => {
  10. document.querySelector( '.toolbar-container' ).appendChild( editor.ui.view.toolbar.element );
  11. window.editor = editor;
  12. } )
  13. .catch( error => {
  14. console.error( 'There was a problem initializing the editor.', error );
  15. } );