image-toolbar.js 672 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* globals ClassicEditor, console, window, document */
  6. import { TOKEN_URL } from '@ckeditor/ckeditor5-cloudservices/tests/_utils/cloudservices-config.js';
  7. ClassicEditor
  8. .create( document.querySelector( '#snippet-image-toolbar' ), {
  9. removePlugins: [ 'ImageCaption', 'ImageStyle' ],
  10. image: {
  11. toolbar: [ 'imageTextAlternative' ]
  12. },
  13. toolbar: {
  14. viewportTopOffset: 60
  15. },
  16. cloudServices: {
  17. tokenUrl: TOKEN_URL
  18. }
  19. } )
  20. .then( editor => {
  21. window.editorToolbar = editor;
  22. } )
  23. .catch( err => {
  24. console.error( err );
  25. } );