easyimage.js 889 B

1234567891011121314151617181920212223242526272829
  1. /**
  2. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* globals console, window, document */
  6. import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
  7. import EasyImage from '../../src/easyimage';
  8. import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
  9. import { CS_CONFIG } from '@ckeditor/ckeditor5-cloudservices/tests/_utils/cloudservices-config';
  10. ClassicEditor
  11. .create( document.querySelector( '#editor' ), {
  12. cloudServices: CS_CONFIG,
  13. plugins: [ ArticlePluginSet, EasyImage ],
  14. toolbar: [ 'headings', '|', 'undo', 'redo', 'uploadImage' ],
  15. image: {
  16. toolbar: [ 'imageStyleFull', 'imageStyleSide', '|', 'imageTextAlternative' ]
  17. }
  18. } )
  19. .then( editor => {
  20. window.editor = editor;
  21. } )
  22. .catch( err => {
  23. console.error( err.stack );
  24. } );