| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- /**
- * @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-resize-buttons' ), {
- removePlugins: [ 'LinkImage', 'AutoImage' ],
- 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'
- }
- ],
- styles: [
- 'alignLeft',
- 'alignCenter',
- 'alignRight'
- ],
- toolbar: [
- 'imageStyle:alignLeft',
- 'imageStyle:alignCenter',
- 'imageStyle:alignRight',
- '|',
- 'imageResize:50',
- 'imageResize:75',
- 'imageResize:original'
- ]
- },
- cloudServices: CS_CONFIG
- } )
- .then( editor => {
- window.editorResizeUI = editor;
- } )
- .catch( err => {
- console.error( err );
- } );
|