image-link.js 771 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 ClassicEditor, console, window, document */
  6. import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config.js';
  7. ClassicEditor
  8. .create( document.querySelector( '#snippet-image-link' ), {
  9. toolbar: {
  10. viewportTopOffset: window.getViewportTopOffsetConfig()
  11. },
  12. image: {
  13. toolbar: [
  14. 'imageStyle:full',
  15. 'imageStyle:side',
  16. '|',
  17. 'imageTextAlternative',
  18. '|',
  19. 'linkImage'
  20. ]
  21. },
  22. cloudServices: CS_CONFIG
  23. } )
  24. .then( editor => {
  25. window.editorResize = editor;
  26. } )
  27. .catch( err => {
  28. console.error( err );
  29. } );