-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Expand file tree
/
Copy pathimage-image-optimizer-uploadcare.js
More file actions
57 lines (55 loc) · 1.25 KB
/
image-image-optimizer-uploadcare.js
File metadata and controls
57 lines (55 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/**
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
*/
/* globals ClassicEditor, console, window, document, LICENSE_KEY */
ClassicEditor
.create( document.querySelector( '#image-optimizer-uploadcare' ), {
removePlugins: [ 'CKBox', 'CKBoxImageEdit', 'LinkImage' ],
toolbar: {
items: [
'undo', 'redo',
'|', 'heading',
'|', 'bold', 'italic',
'|', 'link', 'imageInsert', 'insertTable', 'mediaEmbed',
'|', 'bulletedList', 'numberedList', 'outdent', 'indent'
]
},
image: {
toolbar: [
'toggleImageCaption',
'imageTextAlternative',
'|',
'imageStyle:inline',
'imageStyle:block',
'imageStyle:wrapText',
'|',
'uploadcareImageEdit'
]
},
ui: {
viewportOffset: {
top: window.getViewportTopOffsetConfig()
}
},
uploadcare: {
pubkey: '0132b29be08ee83d5ae0',
allowExternalImagesEditing: [ /^data:/, 'origin' ],
uploader: {
sourceList: [
'local',
'url',
'dropbox',
'gdrive',
'facebook',
'gphotos',
'instagram',
'onedrive'
]
}
},
licenseKey: LICENSE_KEY
} )
.catch( err => {
console.error( err.stack );
} );