| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- /**
- * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
- */
- /* globals ClassicEditor, console, window, document */
- import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config.js';
- ClassicEditor
- .create( document.querySelector( '#snippet-image-resizeui' ), {
- removePlugins: [ 'LinkImage' ],
- toolbar: {
- viewportTopOffset: window.getViewportTopOffsetConfig()
- },
- image: {
- resizeOptions: [
- {
- name: 'imageResize:original',
- label: 'Original',
- value: null,
- icon: 'original'
- },
- {
- name: 'imageResize:50',
- label: '50%',
- value: '50',
- icon: 'medium'
- },
- {
- name: 'imageResize:75',
- label: '75%',
- value: '75',
- icon: 'large'
- }
- ],
- toolbar: [
- 'imageStyle:full',
- 'imageStyle:side', '|',
- 'imageResize:50',
- 'imageResize:75',
- 'imageResize:original'
- ]
- },
- cloudServices: CS_CONFIG
- } )
- .then( editor => {
- window.editorResizeUI = editor;
- } )
- .catch( err => {
- console.error( err );
- } );
|