|
@@ -5,34 +5,33 @@
|
|
|
|
|
|
|
|
/* globals ClassicEditor, console, window, document */
|
|
/* globals ClassicEditor, console, window, document */
|
|
|
|
|
|
|
|
-import getToken from '@ckeditor/ckeditor5-easy-image/tests/_utils/gettoken';
|
|
|
|
|
|
|
+import { TOKEN_URL } from '@ckeditor/ckeditor5-cloudservices/tests/_utils/cloudservices-config.js';
|
|
|
|
|
|
|
|
-getToken()
|
|
|
|
|
- .then( token => {
|
|
|
|
|
- ClassicEditor
|
|
|
|
|
- .create( document.querySelector( '#snippet-image-style-custom' ), {
|
|
|
|
|
- image: {
|
|
|
|
|
- styles: [
|
|
|
|
|
- // This option is equal to a situation where no style is applied.
|
|
|
|
|
- 'imageStyleFull',
|
|
|
|
|
|
|
+ClassicEditor
|
|
|
|
|
+ .create( document.querySelector( '#snippet-image-style-custom' ), {
|
|
|
|
|
+ image: {
|
|
|
|
|
+ styles: [
|
|
|
|
|
+ // This option is equal to a situation where no style is applied.
|
|
|
|
|
+ 'imageStyleFull',
|
|
|
|
|
|
|
|
- // This represents an image aligned to left.
|
|
|
|
|
- 'imageStyleAlignLeft',
|
|
|
|
|
|
|
+ // This represents an image aligned to left.
|
|
|
|
|
+ 'imageStyleAlignLeft',
|
|
|
|
|
|
|
|
- // This represents an image aligned to right.
|
|
|
|
|
- 'imageStyleAlignRight'
|
|
|
|
|
- ],
|
|
|
|
|
|
|
+ // This represents an image aligned to right.
|
|
|
|
|
+ 'imageStyleAlignRight'
|
|
|
|
|
+ ],
|
|
|
|
|
|
|
|
- toolbar: [ 'imageTextAlternative', '|', 'imageStyleAlignLeft', 'imageStyleFull', 'imageStyleAlignRight' ]
|
|
|
|
|
- },
|
|
|
|
|
- toolbar: {
|
|
|
|
|
- viewportTopOffset: 60
|
|
|
|
|
- },
|
|
|
|
|
- cloudServices: { token }
|
|
|
|
|
- } )
|
|
|
|
|
- .then( editor => {
|
|
|
|
|
- window.editorStyleCustom = editor;
|
|
|
|
|
- } );
|
|
|
|
|
|
|
+ toolbar: [ 'imageTextAlternative', '|', 'imageStyleAlignLeft', 'imageStyleFull', 'imageStyleAlignRight' ]
|
|
|
|
|
+ },
|
|
|
|
|
+ toolbar: {
|
|
|
|
|
+ viewportTopOffset: 60
|
|
|
|
|
+ },
|
|
|
|
|
+ cloudServices: {
|
|
|
|
|
+ tokenUrl: TOKEN_URL
|
|
|
|
|
+ }
|
|
|
|
|
+ } )
|
|
|
|
|
+ .then( editor => {
|
|
|
|
|
+ window.editorStyleCustom = editor;
|
|
|
} )
|
|
} )
|
|
|
.catch( err => {
|
|
.catch( err => {
|
|
|
console.error( err );
|
|
console.error( err );
|