-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Expand file tree
/
Copy pathballoon-editor.js
More file actions
32 lines (29 loc) · 682 Bytes
/
balloon-editor.js
File metadata and controls
32 lines (29 loc) · 682 Bytes
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
/**
* @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
*/
import {
CS_CONFIG,
BalloonEditor,
getViewportTopOffsetConfig,
setViewportTopOffsetDynamically
} from '@snippets/index.js';
BalloonEditor
.create( document.querySelector( '#snippet-balloon-editor' ), {
removePlugins: [
'CKBox'
],
cloudServices: CS_CONFIG,
ui: {
viewportOffset: {
top: getViewportTopOffsetConfig()
}
}
} )
.then( editor => {
window.editor = editor;
setViewportTopOffsetDynamically( editor );
} )
.catch( err => {
console.error( err );
} );