easyimage.js 903 B

12345678910111213141516171819202122232425262728293031
  1. /**
  2. * @license Copyright (c) 2003-2017, 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 { TOKEN_URL } from '@ckeditor/ckeditor5-cloudservices/tests/_utils/cloudservices-config';
  10. ClassicEditor
  11. .create( document.querySelector( '#editor' ), {
  12. cloudServices: {
  13. tokenUrl: TOKEN_URL
  14. },
  15. plugins: [ ArticlePluginSet, EasyImage ],
  16. toolbar: [ 'headings', 'undo', 'redo', 'insertImage' ],
  17. image: {
  18. toolbar: [ 'imageStyleFull', 'imageStyleSide', '|', 'imageTextAlternative' ]
  19. }
  20. } )
  21. .then( editor => {
  22. window.editor = editor;
  23. } )
  24. .catch( err => {
  25. console.error( err.stack );
  26. } );