@ckeditor/ckeditor5-editor-balloon 47.6.1 → 48.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md CHANGED
@@ -18,7 +18,7 @@ Where not otherwise indicated, all CKEditor 5 content is authored by CKSour
18
18
 
19
19
  The following libraries are included in CKEditor 5 under the [MIT license](https://opensource.org/licenses/MIT):
20
20
 
21
- * es-toolkit - Copyright (c) 2024 Viva Republica, Inc.
21
+ * es-toolkit - Copyright (c) 2024 Viva Republica, Inc and Copyright OpenJS Foundation and other contributors.
22
22
 
23
23
  Trademarks
24
24
  ----------
@@ -5,9 +5,9 @@
5
5
  /**
6
6
  * @module editor-balloon/ballooneditor
7
7
  */
8
- import { Editor, type EditorConfig } from 'ckeditor5/src/core.js';
8
+ import { Editor, type EditorConfig } from '@ckeditor/ckeditor5-core';
9
9
  import { BalloonEditorUI } from './ballooneditorui.js';
10
- declare const BalloonEditor_base: import("ckeditor5/src/utils.js").Mixed<typeof Editor, import("ckeditor5/src/core.js").ElementApi>;
10
+ declare const BalloonEditor_base: import("@ckeditor/ckeditor5-utils").Mixed<typeof Editor, import("@ckeditor/ckeditor5-core").ElementApi>;
11
11
  /**
12
12
  * The balloon editor implementation (Medium-like editor).
13
13
  * It uses an inline editable and a toolbar based on the {@link module:ui/toolbar/balloon/balloontoolbar~BalloonToolbar}.
@@ -31,12 +31,24 @@ export declare class BalloonEditor extends /* #__PURE__ */ BalloonEditor_base {
31
31
  * **Note:** do not use the constructor to create editor instances. Use the static
32
32
  * {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`} method instead.
33
33
  *
34
+ * @param config The editor configuration.
35
+ */
36
+ protected constructor(config: EditorConfig);
37
+ /**
38
+ * Creates an instance of the balloon editor.
39
+ *
40
+ * **Note:** do not use the constructor to create editor instances. Use the static
41
+ * {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`} method instead.
42
+ *
43
+ * **Note**: This constructor signature is deprecated and will be removed in the future release.
44
+ *
45
+ * @deprecated
34
46
  * @param sourceElementOrData The DOM element that will be the source for the created editor
35
47
  * (on which the editor will be initialized) or initial data for the editor. For more information see
36
48
  * {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`}.
37
49
  * @param config The editor configuration.
38
50
  */
39
- protected constructor(sourceElementOrData: HTMLElement | string, config?: EditorConfig);
51
+ protected constructor(sourceElementOrData: HTMLElement | string, config: EditorConfig);
40
52
  /**
41
53
  * Destroys the editor instance, releasing all resources used by it.
42
54
  *
@@ -56,6 +68,98 @@ export declare class BalloonEditor extends /* #__PURE__ */ BalloonEditor_base {
56
68
  *
57
69
  * ```ts
58
70
  * BalloonEditor
71
+ * .create( {
72
+ * root: {
73
+ * element: document.querySelector( '#editor' )
74
+ * }
75
+ * } )
76
+ * .then( editor => {
77
+ * console.log( 'Editor was initialized', editor );
78
+ * } )
79
+ * .catch( err => {
80
+ * console.error( err.stack );
81
+ * } );
82
+ * ```
83
+ *
84
+ * The element's content will be used as the editor data and the element will become the editable element.
85
+ *
86
+ * # Creating a detached editor
87
+ *
88
+ * Alternatively, you can initialize the editor by passing the initial data directly as a string.
89
+ * In this case, the editor will render an element that must be inserted into the DOM for the editor to work properly:
90
+ *
91
+ * ```ts
92
+ * BalloonEditor
93
+ * .create( {
94
+ * root: {
95
+ * initialData: '<p>Hello world!</p>'
96
+ * }
97
+ * } )
98
+ * .then( editor => {
99
+ * console.log( 'Editor was initialized', editor );
100
+ *
101
+ * // Initial data was provided so the editor UI element needs to be added manually to the DOM.
102
+ * document.body.appendChild( editor.ui.element );
103
+ * } )
104
+ * .catch( err => {
105
+ * console.error( err.stack );
106
+ * } );
107
+ * ```
108
+ *
109
+ * This lets you dynamically append the editor to your web page whenever it is convenient for you. You may use this method if your
110
+ * web page content is generated on the client side and the DOM structure is not ready at the moment when you initialize the editor.
111
+ *
112
+ * # Using an existing DOM element (and data provided in `config.root.initialData`)
113
+ *
114
+ * You can also mix these two ways by providing a DOM element to be used and passing the initial data through the configuration:
115
+ *
116
+ * ```ts
117
+ * BalloonEditor
118
+ * .create( {
119
+ * root: {
120
+ * element: document.querySelector( '#editor' ),
121
+ * initialData: '<h2>Initial data</h2><p>Foo bar.</p>'
122
+ * }
123
+ * } )
124
+ * .then( editor => {
125
+ * console.log( 'Editor was initialized', editor );
126
+ * } )
127
+ * .catch( err => {
128
+ * console.error( err.stack );
129
+ * } );
130
+ * ```
131
+ *
132
+ * This method can be used to initialize the editor on an existing element with the specified content in case if your integration
133
+ * makes it difficult to set the content of the source element.
134
+ *
135
+ * # Configuring the editor
136
+ *
137
+ * See the {@link module:core/editor/editorconfig~EditorConfig editor configuration documentation} to learn more about
138
+ * customizing plugins, toolbar and more.
139
+ *
140
+ * # Using the editor from source
141
+ *
142
+ * If you want to use the balloon editor, you need to define the list of
143
+ * {@link module:core/editor/editorconfig~EditorConfig#plugins plugins to be initialized} and
144
+ * {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar items}.
145
+ *
146
+ * @param config The editor configuration.
147
+ * @returns A promise resolved once the editor is ready. The promise resolves with the created editor instance.
148
+ */
149
+ static create(config: EditorConfig): Promise<BalloonEditor>;
150
+ /**
151
+ * Creates a new balloon editor instance.
152
+ *
153
+ * **Note**: This method signature is deprecated and will be removed in the future release.
154
+ *
155
+ * There are three general ways how the editor can be initialized.
156
+ *
157
+ * # Using an existing DOM element (and loading data from it)
158
+ *
159
+ * You can initialize the editor using an existing DOM element:
160
+ *
161
+ * ```ts
162
+ * BalloonEditor
59
163
  * .create( document.querySelector( '#editor' ) )
60
164
  * .then( editor => {
61
165
  * console.log( 'Editor was initialized', editor );
@@ -89,14 +193,16 @@ export declare class BalloonEditor extends /* #__PURE__ */ BalloonEditor_base {
89
193
  * This lets you dynamically append the editor to your web page whenever it is convenient for you. You may use this method if your
90
194
  * web page content is generated on the client side and the DOM structure is not ready at the moment when you initialize the editor.
91
195
  *
92
- * # Using an existing DOM element (and data provided in `config.initialData`)
196
+ * # Using an existing DOM element (and data provided in `config.root.initialData`)
93
197
  *
94
198
  * You can also mix these two ways by providing a DOM element to be used and passing the initial data through the configuration:
95
199
  *
96
200
  * ```ts
97
201
  * BalloonEditor
98
202
  * .create( document.querySelector( '#editor' ), {
99
- * initialData: '<h2>Initial data</h2><p>Foo bar.</p>'
203
+ * root: {
204
+ * initialData: '<h2>Initial data</h2><p>Foo bar.</p>'
205
+ * }
100
206
  * } )
101
207
  * .then( editor => {
102
208
  * console.log( 'Editor was initialized', editor );
@@ -118,11 +224,11 @@ export declare class BalloonEditor extends /* #__PURE__ */ BalloonEditor_base {
118
224
  *
119
225
  * # Using the editor from source
120
226
  *
121
- * If you want to use the balloon editor,
122
- * you need to define the list of
227
+ * If you want to use the balloon editor, you need to define the list of
123
228
  * {@link module:core/editor/editorconfig~EditorConfig#plugins plugins to be initialized} and
124
229
  * {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar items}.
125
230
  *
231
+ * @deprecated
126
232
  * @param sourceElementOrData The DOM element that will be the source for the created editor
127
233
  * or the editor's initial data.
128
234
  *
@@ -137,6 +243,6 @@ export declare class BalloonEditor extends /* #__PURE__ */ BalloonEditor_base {
137
243
  * @param config The editor configuration.
138
244
  * @returns A promise resolved once the editor is ready. The promise resolves with the created editor instance.
139
245
  */
140
- static create(sourceElementOrData: HTMLElement | string, config?: EditorConfig): Promise<BalloonEditor>;
246
+ static create(sourceElementOrData: HTMLElement | string, config: EditorConfig): Promise<BalloonEditor>;
141
247
  }
142
248
  export {};
@@ -5,8 +5,8 @@
5
5
  /**
6
6
  * @module editor-balloon/ballooneditorui
7
7
  */
8
- import { type Editor } from 'ckeditor5/src/core.js';
9
- import { EditorUI } from 'ckeditor5/src/ui.js';
8
+ import { type Editor } from '@ckeditor/ckeditor5-core';
9
+ import { EditorUI } from '@ckeditor/ckeditor5-ui';
10
10
  import { type BalloonEditorUIView } from './ballooneditoruiview.js';
11
11
  /**
12
12
  * The balloon editor UI class.
@@ -5,9 +5,9 @@
5
5
  /**
6
6
  * @module editor-balloon/ballooneditoruiview
7
7
  */
8
- import { EditorUIView, InlineEditableUIView, MenuBarView } from 'ckeditor5/src/ui.js';
9
- import type { Locale } from 'ckeditor5/src/utils.js';
10
- import type { EditingView } from 'ckeditor5/src/engine.js';
8
+ import { EditorUIView, InlineEditableUIView, MenuBarView } from '@ckeditor/ckeditor5-ui';
9
+ import type { Locale } from '@ckeditor/ckeditor5-utils';
10
+ import type { EditingView } from '@ckeditor/ckeditor5-engine';
11
11
  /**
12
12
  * Contextual editor UI view. Uses the {@link module:ui/editableui/inline/inlineeditableuiview~InlineEditableUIView}.
13
13
  */
package/dist/index.css CHANGED
@@ -2,3 +2,6 @@
2
2
  * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
+
6
+
7
+ /*# sourceMappingURL=index.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.css"],"names":[],"mappings":";;;;;;AAEA,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC","file":"index.css.map","sourcesContent":["\n\n/*# sourceMappingURL=index.css.map */"]}
package/dist/index.js CHANGED
@@ -2,9 +2,9 @@
2
2
  * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
- import { ElementApiMixin, Editor, secureSourceElement, attachToForm } from '@ckeditor/ckeditor5-core/dist/index.js';
5
+ import { ElementApiMixin, Editor, normalizeSingleRootEditorConstructorParams, normalizeRootsConfig, secureSourceElement, attachToForm } from '@ckeditor/ckeditor5-core/dist/index.js';
6
6
  import { EditorUI, EditorUIView, InlineEditableUIView, MenuBarView, BalloonToolbar } from '@ckeditor/ckeditor5-ui/dist/index.js';
7
- import { CKEditorError, getDataFromElement } from '@ckeditor/ckeditor5-utils/dist/index.js';
7
+ import { logWarning, CKEditorError } from '@ckeditor/ckeditor5-utils/dist/index.js';
8
8
  import { enableViewPlaceholder } from '@ckeditor/ckeditor5-engine/dist/index.js';
9
9
  import { isElement as isElement$1 } from 'es-toolkit/compat';
10
10
 
@@ -78,12 +78,9 @@ import { isElement as isElement$1 } from 'es-toolkit/compat';
78
78
  const editor = this.editor;
79
79
  const editingView = editor.editing.view;
80
80
  const editingRoot = editingView.document.getRoot();
81
- const placeholder = editor.config.get('placeholder');
81
+ const placeholder = editor.config.get('roots')[editingRoot.rootName].placeholder;
82
82
  if (placeholder) {
83
- const placeholderText = typeof placeholder === 'string' ? placeholder : placeholder[editingRoot.rootName];
84
- if (placeholderText) {
85
- editingRoot.placeholder = placeholderText;
86
- }
83
+ editingRoot.placeholder = placeholder;
87
84
  }
88
85
  enableViewPlaceholder({
89
86
  view: editingView,
@@ -153,37 +150,31 @@ import { isElement as isElement$1 } from 'es-toolkit/compat';
153
150
  /**
154
151
  * @inheritDoc
155
152
  */ ui;
156
- /**
157
- * Creates an instance of the balloon editor.
158
- *
159
- * **Note:** do not use the constructor to create editor instances. Use the static
160
- * {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`} method instead.
161
- *
162
- * @param sourceElementOrData The DOM element that will be the source for the created editor
163
- * (on which the editor will be initialized) or initial data for the editor. For more information see
164
- * {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`}.
165
- * @param config The editor configuration.
166
- */ constructor(sourceElementOrData, config = {}){
167
- // If both `config.initialData` is set and initial data is passed as the constructor parameter, then throw.
168
- if (!isElement(sourceElementOrData) && config.initialData !== undefined) {
169
- // Documented in core/editor/editorconfig.jsdoc.
170
- // eslint-disable-next-line ckeditor5-rules/ckeditor-error-message
171
- throw new CKEditorError('editor-create-initial-data', null);
172
- }
173
- super(config);
174
- if (this.config.get('initialData') === undefined) {
175
- this.config.set('initialData', getInitialData(sourceElementOrData));
153
+ constructor(sourceElementOrDataOrConfig, config = {}){
154
+ const { sourceElementOrData, editorConfig } = normalizeSingleRootEditorConstructorParams(sourceElementOrDataOrConfig, config);
155
+ super(editorConfig);
156
+ normalizeRootsConfig(sourceElementOrData, this.config);
157
+ if (isElement(this.config.get('attachTo'))) {
158
+ // Documented in core/editor/editorconfig.ts.
159
+ logWarning('editor-create-attachto-ignored');
176
160
  }
177
- if (isElement(sourceElementOrData)) {
178
- this.sourceElement = sourceElementOrData;
179
- secureSourceElement(this, sourceElementOrData);
161
+ // From this point use only normalized `roots.main.element`.
162
+ const sourceElement = this.config.get('roots').main.element;
163
+ if (isElement(sourceElement)) {
164
+ if (sourceElement.tagName === 'TEXTAREA') {
165
+ // Documented in core/editor/editor.js
166
+ // eslint-disable-next-line ckeditor5-rules/ckeditor-error-message
167
+ throw new CKEditorError('editor-wrong-element', null);
168
+ }
169
+ this.sourceElement = sourceElement;
170
+ secureSourceElement(this, sourceElement);
180
171
  }
181
172
  const plugins = this.config.get('plugins');
182
173
  plugins.push(BalloonToolbar);
183
174
  this.config.set('plugins', plugins);
184
175
  this.config.define('balloonToolbar', this.config.get('toolbar'));
185
176
  this.model.document.createRoot();
186
- const view = new BalloonEditorUIView(this.locale, this.editing.view, this.sourceElement, this.config.get('label'));
177
+ const view = new BalloonEditorUIView(this.locale, this.editing.view, this.sourceElement, this.config.get('roots').main.label);
187
178
  this.ui = new BalloonEditorUI(this, view);
188
179
  attachToForm(this);
189
180
  }
@@ -204,112 +195,13 @@ import { isElement as isElement$1 } from 'es-toolkit/compat';
204
195
  }
205
196
  });
206
197
  }
207
- /**
208
- * Creates a new balloon editor instance.
209
- *
210
- * There are three general ways how the editor can be initialized.
211
- *
212
- * # Using an existing DOM element (and loading data from it)
213
- *
214
- * You can initialize the editor using an existing DOM element:
215
- *
216
- * ```ts
217
- * BalloonEditor
218
- * .create( document.querySelector( '#editor' ) )
219
- * .then( editor => {
220
- * console.log( 'Editor was initialized', editor );
221
- * } )
222
- * .catch( err => {
223
- * console.error( err.stack );
224
- * } );
225
- * ```
226
- *
227
- * The element's content will be used as the editor data and the element will become the editable element.
228
- *
229
- * # Creating a detached editor
230
- *
231
- * Alternatively, you can initialize the editor by passing the initial data directly as a string.
232
- * In this case, the editor will render an element that must be inserted into the DOM for the editor to work properly:
233
- *
234
- * ```ts
235
- * BalloonEditor
236
- * .create( '<p>Hello world!</p>' )
237
- * .then( editor => {
238
- * console.log( 'Editor was initialized', editor );
239
- *
240
- * // Initial data was provided so the editor UI element needs to be added manually to the DOM.
241
- * document.body.appendChild( editor.ui.element );
242
- * } )
243
- * .catch( err => {
244
- * console.error( err.stack );
245
- * } );
246
- * ```
247
- *
248
- * This lets you dynamically append the editor to your web page whenever it is convenient for you. You may use this method if your
249
- * web page content is generated on the client side and the DOM structure is not ready at the moment when you initialize the editor.
250
- *
251
- * # Using an existing DOM element (and data provided in `config.initialData`)
252
- *
253
- * You can also mix these two ways by providing a DOM element to be used and passing the initial data through the configuration:
254
- *
255
- * ```ts
256
- * BalloonEditor
257
- * .create( document.querySelector( '#editor' ), {
258
- * initialData: '<h2>Initial data</h2><p>Foo bar.</p>'
259
- * } )
260
- * .then( editor => {
261
- * console.log( 'Editor was initialized', editor );
262
- * } )
263
- * .catch( err => {
264
- * console.error( err.stack );
265
- * } );
266
- * ```
267
- *
268
- * This method can be used to initialize the editor on an existing element with the specified content in case if your integration
269
- * makes it difficult to set the content of the source element.
270
- *
271
- * Note that an error will be thrown if you pass the initial data both as the first parameter and also in the configuration.
272
- *
273
- * # Configuring the editor
274
- *
275
- * See the {@link module:core/editor/editorconfig~EditorConfig editor configuration documentation} to learn more about
276
- * customizing plugins, toolbar and more.
277
- *
278
- * # Using the editor from source
279
- *
280
- * If you want to use the balloon editor,
281
- * you need to define the list of
282
- * {@link module:core/editor/editorconfig~EditorConfig#plugins plugins to be initialized} and
283
- * {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar items}.
284
- *
285
- * @param sourceElementOrData The DOM element that will be the source for the created editor
286
- * or the editor's initial data.
287
- *
288
- * If a DOM element is passed, its content will be automatically loaded to the editor upon initialization.
289
- * The editor data will be set back to the original element once the editor is destroyed only if the
290
- * {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy updateSourceElementOnDestroy}
291
- * option is set to `true`.
292
- *
293
- * If the initial data is passed, a detached editor will be created. In this case you need to insert it into the DOM manually.
294
- * It is available under the {@link module:editor-balloon/ballooneditorui~BalloonEditorUI#element `editor.ui.element`} property.
295
- *
296
- * @param config The editor configuration.
297
- * @returns A promise resolved once the editor is ready. The promise resolves with the created editor instance.
298
- */ static create(sourceElementOrData, config = {}) {
198
+ static create(sourceElementOrDataOrConfig, config = {}) {
299
199
  return new Promise((resolve)=>{
300
- if (isElement(sourceElementOrData) && sourceElementOrData.tagName === 'TEXTAREA') {
301
- // Documented in core/editor/editor.js
302
- // eslint-disable-next-line ckeditor5-rules/ckeditor-error-message
303
- throw new CKEditorError('editor-wrong-element', null);
304
- }
305
- const editor = new this(sourceElementOrData, config);
306
- resolve(editor.initPlugins().then(()=>editor.ui.init()).then(()=>editor.data.init(editor.config.get('initialData'))).then(()=>editor.fire('ready')).then(()=>editor));
200
+ const editor = new this(sourceElementOrDataOrConfig, config);
201
+ resolve(editor.initPlugins().then(()=>editor.ui.init()).then(()=>editor.data.init(editor.config.get('roots').main.initialData)).then(()=>editor.fire('ready')).then(()=>editor));
307
202
  });
308
203
  }
309
204
  }
310
- function getInitialData(sourceElementOrData) {
311
- return isElement(sourceElementOrData) ? getDataFromElement(sourceElementOrData) : sourceElementOrData;
312
- }
313
205
  function isElement(value) {
314
206
  return isElement$1(value);
315
207
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js","../src/ballooneditorui.ts","../src/ballooneditoruiview.ts","../src/ballooneditor.ts"],"names":["BalloonEditorUI","EditorUI","view","editor","element","editable","init","editingView","editing","editingRoot","document","getRoot","name","rootName","render","editableElement","setEditableElement","bind","to","focusTracker","attachDomRoot","_initPlaceholder","initMenuBar","menuBarView","fire","destroy","getDomRoot","detachDomRoot","placeholder","config","get","placeholderText","enableViewPlaceholder","isDirectHost","keepOnFocus","BalloonEditorUIView","EditorUIView","locale","label","InlineEditableUIView","MenuBarView","extendTemplate","attributes","class","dir","uiLanguageDirection","registerChild","BalloonEditor","ElementApiMixin","Editor","editorName","ui","sourceElementOrData","isElement","initialData","undefined","CKEditorError","set","getInitialData","sourceElement","secureSourceElement","plugins","push","BalloonToolbar","define","model","createRoot","attachToForm","data","getData","then","updateSourceElement","create","Promise","resolve","tagName","initPlugins","getDataFromElement","value","_isElement"],"mappings":";;;;AAAA,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AACnH,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,YAAY,CAAC,CAAC,oBAAoB,CAAC,CAAC,WAAW,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AAChI,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AAC3F,MAAM,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AAChF,MAAM,CAAC,CAAC,CAAC,SAA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AAAA,CAAwBA,mBAAAA;AACvF;AAEA,QAAA,CAASC,SAAAA,CAAWyB,KAAU,CAAA,CAAA;AAC7B,CAAA,CAAA,CAAA,CAAA,MAAA,CAAOC,SAAAA,CAAAA,CAAAA,CAAYD,KAAAA,CAAAA;AACpB;;AH+EA,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,eAAe,CAAC,CAAC,mBAAmB,CAAC,CAAC;AAC9D,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC","file":"index.js.map","sourcesContent":["import { ElementApiMixin, Editor, secureSourceElement, attachToForm } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { EditorUI, EditorUIView, InlineEditableUIView, MenuBarView, BalloonToolbar } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { CKEditorError, getDataFromElement } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { enableViewPlaceholder } from '@ckeditor/ckeditor5-engine/dist/index.js';\nimport { isElement as isElement$1 } from 'es-toolkit/compat';\n\n/**\n * The balloon editor UI class.\n */ class BalloonEditorUI extends EditorUI {\n /**\n\t * The main (top–most) view of the editor UI.\n\t */ view;\n /**\n\t * Creates an instance of the balloon editor UI class.\n\t *\n\t * @param editor The editor instance.\n\t * @param view The view of the UI.\n\t */ constructor(editor, view){\n super(editor);\n this.view = view;\n }\n /**\n\t * @inheritDoc\n\t */ get element() {\n return this.view.editable.element;\n }\n /**\n\t * Initializes the UI.\n\t */ init() {\n const editor = this.editor;\n const view = this.view;\n const editingView = editor.editing.view;\n const editable = view.editable;\n const editingRoot = editingView.document.getRoot();\n // The editable UI and editing root should share the same name. Then name is used\n // to recognize the particular editable, for instance in ARIA attributes.\n editable.name = editingRoot.rootName;\n view.render();\n // The editable UI element in DOM is available for sure only after the editor UI view has been rendered.\n // But it can be available earlier if a DOM element has been passed to BalloonEditor.create().\n const editableElement = editable.element;\n // Register the editable UI view in the editor. A single editor instance can aggregate multiple\n // editable areas (roots) but the balloon editor has only one.\n this.setEditableElement(editable.name, editableElement);\n // Let the editable UI element respond to the changes in the global editor focus\n // tracker. It has been added to the same tracker a few lines above but, in reality, there are\n // many focusable areas in the editor, like balloons, toolbars or dropdowns and as long\n // as they have focus, the editable should act like it is focused too (although technically\n // it isn't), e.g. by setting the proper CSS class, visually announcing focus to the user.\n // Doing otherwise will result in editable focus styles disappearing, once e.g. the\n // toolbar gets focused.\n editable.bind('isFocused').to(this.focusTracker);\n // Bind the editable UI element to the editing view, making it an end– and entry–point\n // of the editor's engine. This is where the engine meets the UI.\n editingView.attachDomRoot(editableElement);\n this._initPlaceholder();\n this.initMenuBar(this.view.menuBarView);\n this.fire('ready');\n }\n /**\n\t * @inheritDoc\n\t */ destroy() {\n super.destroy();\n const view = this.view;\n const editingView = this.editor.editing.view;\n if (editingView.getDomRoot(view.editable.name)) {\n editingView.detachDomRoot(view.editable.name);\n }\n view.destroy();\n }\n /**\n\t * Enable the placeholder text on the editing root.\n\t */ _initPlaceholder() {\n const editor = this.editor;\n const editingView = editor.editing.view;\n const editingRoot = editingView.document.getRoot();\n const placeholder = editor.config.get('placeholder');\n if (placeholder) {\n const placeholderText = typeof placeholder === 'string' ? placeholder : placeholder[editingRoot.rootName];\n if (placeholderText) {\n editingRoot.placeholder = placeholderText;\n }\n }\n enableViewPlaceholder({\n view: editingView,\n element: editingRoot,\n isDirectHost: false,\n keepOnFocus: true\n });\n }\n}\n\n/**\n * Contextual editor UI view. Uses the {@link module:ui/editableui/inline/inlineeditableuiview~InlineEditableUIView}.\n */ class BalloonEditorUIView extends EditorUIView {\n /**\n\t * Editable UI view.\n\t */ editable;\n /**\n\t * Menu bar view instance.\n\t */ menuBarView;\n /**\n\t * Creates an instance of the balloon editor UI view.\n\t *\n\t * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t * @param editingView The editing view instance this view is related to.\n\t * @param editableElement The editable element. If not specified, it will be automatically created by\n\t * {@link module:ui/editableui/editableuiview~EditableUIView}. Otherwise, the given element will be used.\n\t * @param label When set, this value will be used as an accessible `aria-label` of the\n\t * {@link module:ui/editableui/editableuiview~EditableUIView editable view}.\n\t */ constructor(locale, editingView, editableElement, label){\n super(locale);\n this.editable = new InlineEditableUIView(locale, editingView, editableElement, {\n label\n });\n this.menuBarView = new MenuBarView(locale);\n this.menuBarView.extendTemplate({\n attributes: {\n class: [\n 'ck-reset_all',\n 'ck-rounded-corners'\n ],\n dir: locale.uiLanguageDirection\n }\n });\n }\n /**\n\t * @inheritDoc\n\t */ render() {\n super.render();\n this.registerChild(this.editable);\n this.registerChild(this.menuBarView);\n }\n}\n\n/**\n * The balloon editor implementation (Medium-like editor).\n * It uses an inline editable and a toolbar based on the {@link module:ui/toolbar/balloon/balloontoolbar~BalloonToolbar}.\n * See the {@glink examples/builds/balloon-editor demo}.\n *\n * In order to create a balloon editor instance, use the static\n * {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`} method.\n */ class BalloonEditor extends /* #__PURE__ */ ElementApiMixin(Editor) {\n /**\n\t * @inheritDoc\n\t */ static get editorName() {\n return 'BalloonEditor';\n }\n /**\n\t * @inheritDoc\n\t */ ui;\n /**\n\t * Creates an instance of the balloon editor.\n\t *\n\t * **Note:** do not use the constructor to create editor instances. Use the static\n\t * {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`} method instead.\n\t *\n\t * @param sourceElementOrData The DOM element that will be the source for the created editor\n\t * (on which the editor will be initialized) or initial data for the editor. For more information see\n\t * {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`}.\n\t * @param config The editor configuration.\n\t */ constructor(sourceElementOrData, config = {}){\n // If both `config.initialData` is set and initial data is passed as the constructor parameter, then throw.\n if (!isElement(sourceElementOrData) && config.initialData !== undefined) {\n // Documented in core/editor/editorconfig.jsdoc.\n // eslint-disable-next-line ckeditor5-rules/ckeditor-error-message\n throw new CKEditorError('editor-create-initial-data', null);\n }\n super(config);\n if (this.config.get('initialData') === undefined) {\n this.config.set('initialData', getInitialData(sourceElementOrData));\n }\n if (isElement(sourceElementOrData)) {\n this.sourceElement = sourceElementOrData;\n secureSourceElement(this, sourceElementOrData);\n }\n const plugins = this.config.get('plugins');\n plugins.push(BalloonToolbar);\n this.config.set('plugins', plugins);\n this.config.define('balloonToolbar', this.config.get('toolbar'));\n this.model.document.createRoot();\n const view = new BalloonEditorUIView(this.locale, this.editing.view, this.sourceElement, this.config.get('label'));\n this.ui = new BalloonEditorUI(this, view);\n attachToForm(this);\n }\n /**\n\t * Destroys the editor instance, releasing all resources used by it.\n\t *\n\t * Updates the original editor element with the data if the\n\t * {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy `updateSourceElementOnDestroy`}\n\t * configuration option is set to `true`.\n\t */ destroy() {\n // Cache the data, then destroy.\n // It's safe to assume that the model->view conversion will not work after super.destroy().\n const data = this.getData();\n this.ui.destroy();\n return super.destroy().then(()=>{\n if (this.sourceElement) {\n this.updateSourceElement(data);\n }\n });\n }\n /**\n\t * Creates a new balloon editor instance.\n\t *\n\t * There are three general ways how the editor can be initialized.\n\t *\n\t * # Using an existing DOM element (and loading data from it)\n\t *\n\t * You can initialize the editor using an existing DOM element:\n\t *\n\t * ```ts\n\t * BalloonEditor\n\t * \t.create( document.querySelector( '#editor' ) )\n\t * \t.then( editor => {\n\t * \t\tconsole.log( 'Editor was initialized', editor );\n\t * \t} )\n\t * \t.catch( err => {\n\t * \t\tconsole.error( err.stack );\n\t * \t} );\n\t * ```\n\t *\n\t * The element's content will be used as the editor data and the element will become the editable element.\n\t *\n\t * # Creating a detached editor\n\t *\n\t * Alternatively, you can initialize the editor by passing the initial data directly as a string.\n\t * In this case, the editor will render an element that must be inserted into the DOM for the editor to work properly:\n\t *\n\t * ```ts\n\t * BalloonEditor\n\t * \t.create( '<p>Hello world!</p>' )\n\t * \t.then( editor => {\n\t * \t\tconsole.log( 'Editor was initialized', editor );\n\t *\n\t * \t\t// Initial data was provided so the editor UI element needs to be added manually to the DOM.\n\t * \t\tdocument.body.appendChild( editor.ui.element );\n\t * \t} )\n\t * \t.catch( err => {\n\t * \t\tconsole.error( err.stack );\n\t * \t} );\n\t * ```\n\t *\n\t * This lets you dynamically append the editor to your web page whenever it is convenient for you. You may use this method if your\n\t * web page content is generated on the client side and the DOM structure is not ready at the moment when you initialize the editor.\n\t *\n\t * # Using an existing DOM element (and data provided in `config.initialData`)\n\t *\n\t * You can also mix these two ways by providing a DOM element to be used and passing the initial data through the configuration:\n\t *\n\t * ```ts\n\t * BalloonEditor\n\t * \t.create( document.querySelector( '#editor' ), {\n\t * \t\tinitialData: '<h2>Initial data</h2><p>Foo bar.</p>'\n\t * \t} )\n\t * \t.then( editor => {\n\t * \t\tconsole.log( 'Editor was initialized', editor );\n\t * \t} )\n\t * \t.catch( err => {\n\t * \t\tconsole.error( err.stack );\n\t * \t} );\n\t * ```\n\t *\n\t * This method can be used to initialize the editor on an existing element with the specified content in case if your integration\n\t * makes it difficult to set the content of the source element.\n\t *\n\t * Note that an error will be thrown if you pass the initial data both as the first parameter and also in the configuration.\n\t *\n\t * # Configuring the editor\n\t *\n\t * See the {@link module:core/editor/editorconfig~EditorConfig editor configuration documentation} to learn more about\n\t * customizing plugins, toolbar and more.\n\t *\n\t * # Using the editor from source\n\t *\n\t * If you want to use the balloon editor,\n\t * you need to define the list of\n\t * {@link module:core/editor/editorconfig~EditorConfig#plugins plugins to be initialized} and\n\t * {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar items}.\n\t *\n\t * @param sourceElementOrData The DOM element that will be the source for the created editor\n\t * or the editor's initial data.\n\t *\n\t * If a DOM element is passed, its content will be automatically loaded to the editor upon initialization.\n\t * The editor data will be set back to the original element once the editor is destroyed only if the\n\t * {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy updateSourceElementOnDestroy}\n\t * option is set to `true`.\n\t *\n\t * If the initial data is passed, a detached editor will be created. In this case you need to insert it into the DOM manually.\n\t * It is available under the {@link module:editor-balloon/ballooneditorui~BalloonEditorUI#element `editor.ui.element`} property.\n\t *\n\t * @param config The editor configuration.\n\t * @returns A promise resolved once the editor is ready. The promise resolves with the created editor instance.\n\t */ static create(sourceElementOrData, config = {}) {\n return new Promise((resolve)=>{\n if (isElement(sourceElementOrData) && sourceElementOrData.tagName === 'TEXTAREA') {\n // Documented in core/editor/editor.js\n // eslint-disable-next-line ckeditor5-rules/ckeditor-error-message\n throw new CKEditorError('editor-wrong-element', null);\n }\n const editor = new this(sourceElementOrData, config);\n resolve(editor.initPlugins().then(()=>editor.ui.init()).then(()=>editor.data.init(editor.config.get('initialData'))).then(()=>editor.fire('ready')).then(()=>editor));\n });\n }\n}\nfunction getInitialData(sourceElementOrData) {\n return isElement(sourceElementOrData) ? getDataFromElement(sourceElementOrData) : sourceElementOrData;\n}\nfunction isElement(value) {\n return isElement$1(value);\n}\n\nexport { BalloonEditor, BalloonEditorUI, BalloonEditorUIView };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module editor-balloon/ballooneditorui\n */\n\nimport {\n\ttype Editor\n} from 'ckeditor5/src/core.js';\n\nimport {\n\tEditorUI,\n\ttype EditorUIReadyEvent\n} from 'ckeditor5/src/ui.js';\n\nimport { enableViewPlaceholder } from 'ckeditor5/src/engine.js';\n\nimport { type BalloonEditorUIView } from './ballooneditoruiview.js';\n\n/**\n * The balloon editor UI class.\n */\nexport class BalloonEditorUI extends EditorUI {\n\t/**\n\t * The main (top–most) view of the editor UI.\n\t */\n\tpublic readonly view: BalloonEditorUIView;\n\n\t/**\n\t * Creates an instance of the balloon editor UI class.\n\t *\n\t * @param editor The editor instance.\n\t * @param view The view of the UI.\n\t */\n\tconstructor( editor: Editor, view: BalloonEditorUIView ) {\n\t\tsuper( editor );\n\n\t\tthis.view = view;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override get element(): HTMLElement | null {\n\t\treturn this.view.editable.element;\n\t}\n\n\t/**\n\t * Initializes the UI.\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst view = this.view;\n\t\tconst editingView = editor.editing.view;\n\t\tconst editable = view.editable;\n\t\tconst editingRoot = editingView.document.getRoot()!;\n\n\t\t// The editable UI and editing root should share the same name. Then name is used\n\t\t// to recognize the particular editable, for instance in ARIA attributes.\n\t\teditable.name = editingRoot.rootName;\n\n\t\tview.render();\n\n\t\t// The editable UI element in DOM is available for sure only after the editor UI view has been rendered.\n\t\t// But it can be available earlier if a DOM element has been passed to BalloonEditor.create().\n\t\tconst editableElement = editable.element!;\n\n\t\t// Register the editable UI view in the editor. A single editor instance can aggregate multiple\n\t\t// editable areas (roots) but the balloon editor has only one.\n\t\tthis.setEditableElement( editable.name, editableElement );\n\n\t\t// Let the editable UI element respond to the changes in the global editor focus\n\t\t// tracker. It has been added to the same tracker a few lines above but, in reality, there are\n\t\t// many focusable areas in the editor, like balloons, toolbars or dropdowns and as long\n\t\t// as they have focus, the editable should act like it is focused too (although technically\n\t\t// it isn't), e.g. by setting the proper CSS class, visually announcing focus to the user.\n\t\t// Doing otherwise will result in editable focus styles disappearing, once e.g. the\n\t\t// toolbar gets focused.\n\t\teditable.bind( 'isFocused' ).to( this.focusTracker );\n\n\t\t// Bind the editable UI element to the editing view, making it an end– and entry–point\n\t\t// of the editor's engine. This is where the engine meets the UI.\n\t\teditingView.attachDomRoot( editableElement );\n\n\t\tthis._initPlaceholder();\n\t\tthis.initMenuBar( this.view.menuBarView! );\n\t\tthis.fire<EditorUIReadyEvent>( 'ready' );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tconst view = this.view;\n\t\tconst editingView = this.editor.editing.view;\n\n\t\tif ( editingView.getDomRoot( view.editable.name! ) ) {\n\t\t\teditingView.detachDomRoot( view.editable.name! );\n\t\t}\n\n\t\tview.destroy();\n\t}\n\n\t/**\n\t * Enable the placeholder text on the editing root.\n\t */\n\tprivate _initPlaceholder(): void {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\t\tconst editingRoot = editingView.document.getRoot()!;\n\t\tconst placeholder = editor.config.get( 'placeholder' );\n\n\t\tif ( placeholder ) {\n\t\t\tconst placeholderText = typeof placeholder === 'string' ? placeholder : placeholder[ editingRoot.rootName ];\n\n\t\t\tif ( placeholderText ) {\n\t\t\t\teditingRoot.placeholder = placeholderText;\n\t\t\t}\n\t\t}\n\n\t\tenableViewPlaceholder( {\n\t\t\tview: editingView,\n\t\t\telement: editingRoot,\n\t\t\tisDirectHost: false,\n\t\t\tkeepOnFocus: true\n\t\t} );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module editor-balloon/ballooneditoruiview\n */\n\nimport { EditorUIView, InlineEditableUIView, MenuBarView } from 'ckeditor5/src/ui.js';\nimport type { Locale } from 'ckeditor5/src/utils.js';\nimport type { EditingView } from 'ckeditor5/src/engine.js';\n\n/**\n * Contextual editor UI view. Uses the {@link module:ui/editableui/inline/inlineeditableuiview~InlineEditableUIView}.\n */\nexport class BalloonEditorUIView extends EditorUIView {\n\t/**\n\t * Editable UI view.\n\t */\n\tpublic readonly editable: InlineEditableUIView;\n\n\t/**\n\t * Menu bar view instance.\n\t */\n\tpublic override menuBarView: MenuBarView;\n\n\t/**\n\t * Creates an instance of the balloon editor UI view.\n\t *\n\t * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t * @param editingView The editing view instance this view is related to.\n\t * @param editableElement The editable element. If not specified, it will be automatically created by\n\t * {@link module:ui/editableui/editableuiview~EditableUIView}. Otherwise, the given element will be used.\n\t * @param label When set, this value will be used as an accessible `aria-label` of the\n\t * {@link module:ui/editableui/editableuiview~EditableUIView editable view}.\n\t */\n\tconstructor(\n\t\tlocale: Locale,\n\t\teditingView: EditingView,\n\t\teditableElement?: HTMLElement,\n\t\tlabel?: string | Record<string, string>\n\t) {\n\t\tsuper( locale );\n\n\t\tthis.editable = new InlineEditableUIView( locale, editingView, editableElement, {\n\t\t\tlabel\n\t\t} );\n\n\t\tthis.menuBarView = new MenuBarView( locale );\n\n\t\tthis.menuBarView.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-reset_all',\n\t\t\t\t\t'ck-rounded-corners'\n\t\t\t\t],\n\t\t\t\tdir: locale.uiLanguageDirection\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.registerChild( this.editable );\n\t\tthis.registerChild( this.menuBarView );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module editor-balloon/ballooneditor\n */\n\nimport {\n\tEditor,\n\tElementApiMixin,\n\tattachToForm,\n\tsecureSourceElement,\n\ttype EditorConfig,\n\ttype EditorReadyEvent\n} from 'ckeditor5/src/core.js';\n\nimport { BalloonToolbar } from 'ckeditor5/src/ui.js';\nimport { CKEditorError, getDataFromElement } from 'ckeditor5/src/utils.js';\n\nimport { BalloonEditorUI } from './ballooneditorui.js';\nimport { BalloonEditorUIView } from './ballooneditoruiview.js';\n\nimport { isElement as _isElement } from 'es-toolkit/compat';\n\n/**\n * The balloon editor implementation (Medium-like editor).\n * It uses an inline editable and a toolbar based on the {@link module:ui/toolbar/balloon/balloontoolbar~BalloonToolbar}.\n * See the {@glink examples/builds/balloon-editor demo}.\n *\n * In order to create a balloon editor instance, use the static\n * {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`} method.\n */\nexport class BalloonEditor extends /* #__PURE__ */ ElementApiMixin( Editor ) {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get editorName(): 'BalloonEditor' {\n\t\treturn 'BalloonEditor';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic readonly ui: BalloonEditorUI;\n\n\t/**\n\t * Creates an instance of the balloon editor.\n\t *\n\t * **Note:** do not use the constructor to create editor instances. Use the static\n\t * {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`} method instead.\n\t *\n\t * @param sourceElementOrData The DOM element that will be the source for the created editor\n\t * (on which the editor will be initialized) or initial data for the editor. For more information see\n\t * {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`}.\n\t * @param config The editor configuration.\n\t */\n\tprotected constructor( sourceElementOrData: HTMLElement | string, config: EditorConfig = {} ) {\n\t\t// If both `config.initialData` is set and initial data is passed as the constructor parameter, then throw.\n\t\tif ( !isElement( sourceElementOrData ) && config.initialData !== undefined ) {\n\t\t\t// Documented in core/editor/editorconfig.jsdoc.\n\t\t\t// eslint-disable-next-line ckeditor5-rules/ckeditor-error-message\n\t\t\tthrow new CKEditorError( 'editor-create-initial-data', null );\n\t\t}\n\n\t\tsuper( config );\n\n\t\tif ( this.config.get( 'initialData' ) === undefined ) {\n\t\t\tthis.config.set( 'initialData', getInitialData( sourceElementOrData ) );\n\t\t}\n\n\t\tif ( isElement( sourceElementOrData ) ) {\n\t\t\tthis.sourceElement = sourceElementOrData;\n\t\t\tsecureSourceElement( this, sourceElementOrData );\n\t\t}\n\n\t\tconst plugins = this.config.get( 'plugins' )!;\n\t\tplugins.push( BalloonToolbar );\n\n\t\tthis.config.set( 'plugins', plugins );\n\n\t\tthis.config.define( 'balloonToolbar', this.config.get( 'toolbar' ) );\n\n\t\tthis.model.document.createRoot();\n\n\t\tconst view = new BalloonEditorUIView( this.locale, this.editing.view, this.sourceElement, this.config.get( 'label' ) );\n\t\tthis.ui = new BalloonEditorUI( this, view );\n\n\t\tattachToForm( this );\n\t}\n\n\t/**\n\t * Destroys the editor instance, releasing all resources used by it.\n\t *\n\t * Updates the original editor element with the data if the\n\t * {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy `updateSourceElementOnDestroy`}\n\t * configuration option is set to `true`.\n\t */\n\tpublic override destroy(): Promise<unknown> {\n\t\t// Cache the data, then destroy.\n\t\t// It's safe to assume that the model->view conversion will not work after super.destroy().\n\t\tconst data = this.getData();\n\n\t\tthis.ui.destroy();\n\n\t\treturn super.destroy()\n\t\t\t.then( () => {\n\t\t\t\tif ( this.sourceElement ) {\n\t\t\t\t\tthis.updateSourceElement( data );\n\t\t\t\t}\n\t\t\t} );\n\t}\n\n\t/**\n\t * Creates a new balloon editor instance.\n\t *\n\t * There are three general ways how the editor can be initialized.\n\t *\n\t * # Using an existing DOM element (and loading data from it)\n\t *\n\t * You can initialize the editor using an existing DOM element:\n\t *\n\t * ```ts\n\t * BalloonEditor\n\t * \t.create( document.querySelector( '#editor' ) )\n\t * \t.then( editor => {\n\t * \t\tconsole.log( 'Editor was initialized', editor );\n\t * \t} )\n\t * \t.catch( err => {\n\t * \t\tconsole.error( err.stack );\n\t * \t} );\n\t * ```\n\t *\n\t * The element's content will be used as the editor data and the element will become the editable element.\n\t *\n\t * # Creating a detached editor\n\t *\n\t * Alternatively, you can initialize the editor by passing the initial data directly as a string.\n\t * In this case, the editor will render an element that must be inserted into the DOM for the editor to work properly:\n\t *\n\t * ```ts\n\t * BalloonEditor\n\t * \t.create( '<p>Hello world!</p>' )\n\t * \t.then( editor => {\n\t * \t\tconsole.log( 'Editor was initialized', editor );\n\t *\n\t * \t\t// Initial data was provided so the editor UI element needs to be added manually to the DOM.\n\t * \t\tdocument.body.appendChild( editor.ui.element );\n\t * \t} )\n\t * \t.catch( err => {\n\t * \t\tconsole.error( err.stack );\n\t * \t} );\n\t * ```\n\t *\n\t * This lets you dynamically append the editor to your web page whenever it is convenient for you. You may use this method if your\n\t * web page content is generated on the client side and the DOM structure is not ready at the moment when you initialize the editor.\n\t *\n\t * # Using an existing DOM element (and data provided in `config.initialData`)\n\t *\n\t * You can also mix these two ways by providing a DOM element to be used and passing the initial data through the configuration:\n\t *\n\t * ```ts\n\t * BalloonEditor\n\t * \t.create( document.querySelector( '#editor' ), {\n\t * \t\tinitialData: '<h2>Initial data</h2><p>Foo bar.</p>'\n\t * \t} )\n\t * \t.then( editor => {\n\t * \t\tconsole.log( 'Editor was initialized', editor );\n\t * \t} )\n\t * \t.catch( err => {\n\t * \t\tconsole.error( err.stack );\n\t * \t} );\n\t * ```\n\t *\n\t * This method can be used to initialize the editor on an existing element with the specified content in case if your integration\n\t * makes it difficult to set the content of the source element.\n\t *\n\t * Note that an error will be thrown if you pass the initial data both as the first parameter and also in the configuration.\n\t *\n\t * # Configuring the editor\n\t *\n\t * See the {@link module:core/editor/editorconfig~EditorConfig editor configuration documentation} to learn more about\n\t * customizing plugins, toolbar and more.\n\t *\n\t * # Using the editor from source\n\t *\n\t * If you want to use the balloon editor,\n\t * you need to define the list of\n\t * {@link module:core/editor/editorconfig~EditorConfig#plugins plugins to be initialized} and\n\t * {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar items}.\n\t *\n\t * @param sourceElementOrData The DOM element that will be the source for the created editor\n\t * or the editor's initial data.\n\t *\n\t * If a DOM element is passed, its content will be automatically loaded to the editor upon initialization.\n\t * The editor data will be set back to the original element once the editor is destroyed only if the\n\t * {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy updateSourceElementOnDestroy}\n\t * option is set to `true`.\n\t *\n\t * If the initial data is passed, a detached editor will be created. In this case you need to insert it into the DOM manually.\n\t * It is available under the {@link module:editor-balloon/ballooneditorui~BalloonEditorUI#element `editor.ui.element`} property.\n\t *\n\t * @param config The editor configuration.\n\t * @returns A promise resolved once the editor is ready. The promise resolves with the created editor instance.\n\t */\n\tpublic static override create( sourceElementOrData: HTMLElement | string, config: EditorConfig = {} ): Promise<BalloonEditor> {\n\t\treturn new Promise( resolve => {\n\t\t\tif ( isElement( sourceElementOrData ) && sourceElementOrData.tagName === 'TEXTAREA' ) {\n\t\t\t\t// Documented in core/editor/editor.js\n\t\t\t\t// eslint-disable-next-line ckeditor5-rules/ckeditor-error-message\n\t\t\t\tthrow new CKEditorError( 'editor-wrong-element', null );\n\t\t\t}\n\n\t\t\tconst editor = new this( sourceElementOrData, config );\n\n\t\t\tresolve(\n\t\t\t\teditor.initPlugins()\n\t\t\t\t\t.then( () => editor.ui.init() )\n\t\t\t\t\t.then( () => editor.data.init( editor.config.get( 'initialData' )! ) )\n\t\t\t\t\t.then( () => editor.fire<EditorReadyEvent>( 'ready' ) )\n\t\t\t\t\t.then( () => editor )\n\t\t\t);\n\t\t} );\n\t}\n}\n\nfunction getInitialData( sourceElementOrData: HTMLElement | string ): string {\n\treturn isElement( sourceElementOrData ) ? getDataFromElement( sourceElementOrData ) : sourceElementOrData;\n}\n\nfunction isElement( value: any ): value is Element {\n\treturn _isElement( value );\n}\n"]}
1
+ {"version":3,"sources":["index.js","../src/ballooneditorui.ts","../src/ballooneditoruiview.ts","../src/ballooneditor.ts"],"names":["BalloonEditorUI","EditorUI","view","editor","element","editable","init","editingView","editing","editingRoot","document","getRoot","name","rootName","render","editableElement","setEditableElement","bind","to","focusTracker","attachDomRoot","_initPlaceholder","initMenuBar","menuBarView","fire","destroy","getDomRoot","detachDomRoot","placeholder","config","get","enableViewPlaceholder","isDirectHost","keepOnFocus","BalloonEditorUIView","EditorUIView","locale","label","InlineEditableUIView","MenuBarView","extendTemplate","attributes","class","dir","uiLanguageDirection","registerChild","BalloonEditor","ElementApiMixin","Editor","editorName","ui","sourceElementOrDataOrConfig","sourceElementOrData","editorConfig","normalizeSingleRootEditorConstructorParams","normalizeRootsConfig","isElement","logWarning","sourceElement","main","tagName","CKEditorError","secureSourceElement","plugins","push","BalloonToolbar","set","define","model","createRoot","attachToForm","data","getData","then","updateSourceElement","create","Promise","resolve","initPlugins","initialData","value","_isElement"],"mappings":";;;;AAAA,MAAM,CAAC,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AAWwB,KAAU,CAAA,CAAA;AAC7B,CAAA,CAAA,CAAA,CAAA,MAAA,CAAOC,SAAAA,CAAAA,CAAAA,CAAYD,KAAAA,CAAAA;AACpB;;AHlJA,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,eAAe,CAAC,CAAC,mBAAmB,CAAC,CAAC;AAC9D,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC","file":"index.js.map","sourcesContent":["import { ElementApiMixin, Editor, normalizeSingleRootEditorConstructorParams, normalizeRootsConfig, secureSourceElement, attachToForm } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { EditorUI, EditorUIView, InlineEditableUIView, MenuBarView, BalloonToolbar } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { logWarning, CKEditorError } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { enableViewPlaceholder } from '@ckeditor/ckeditor5-engine/dist/index.js';\nimport { isElement as isElement$1 } from 'es-toolkit/compat';\n\n/**\n * The balloon editor UI class.\n */ class BalloonEditorUI extends EditorUI {\n /**\n\t * The main (top–most) view of the editor UI.\n\t */ view;\n /**\n\t * Creates an instance of the balloon editor UI class.\n\t *\n\t * @param editor The editor instance.\n\t * @param view The view of the UI.\n\t */ constructor(editor, view){\n super(editor);\n this.view = view;\n }\n /**\n\t * @inheritDoc\n\t */ get element() {\n return this.view.editable.element;\n }\n /**\n\t * Initializes the UI.\n\t */ init() {\n const editor = this.editor;\n const view = this.view;\n const editingView = editor.editing.view;\n const editable = view.editable;\n const editingRoot = editingView.document.getRoot();\n // The editable UI and editing root should share the same name. Then name is used\n // to recognize the particular editable, for instance in ARIA attributes.\n editable.name = editingRoot.rootName;\n view.render();\n // The editable UI element in DOM is available for sure only after the editor UI view has been rendered.\n // But it can be available earlier if a DOM element has been passed to BalloonEditor.create().\n const editableElement = editable.element;\n // Register the editable UI view in the editor. A single editor instance can aggregate multiple\n // editable areas (roots) but the balloon editor has only one.\n this.setEditableElement(editable.name, editableElement);\n // Let the editable UI element respond to the changes in the global editor focus\n // tracker. It has been added to the same tracker a few lines above but, in reality, there are\n // many focusable areas in the editor, like balloons, toolbars or dropdowns and as long\n // as they have focus, the editable should act like it is focused too (although technically\n // it isn't), e.g. by setting the proper CSS class, visually announcing focus to the user.\n // Doing otherwise will result in editable focus styles disappearing, once e.g. the\n // toolbar gets focused.\n editable.bind('isFocused').to(this.focusTracker);\n // Bind the editable UI element to the editing view, making it an end– and entry–point\n // of the editor's engine. This is where the engine meets the UI.\n editingView.attachDomRoot(editableElement);\n this._initPlaceholder();\n this.initMenuBar(this.view.menuBarView);\n this.fire('ready');\n }\n /**\n\t * @inheritDoc\n\t */ destroy() {\n super.destroy();\n const view = this.view;\n const editingView = this.editor.editing.view;\n if (editingView.getDomRoot(view.editable.name)) {\n editingView.detachDomRoot(view.editable.name);\n }\n view.destroy();\n }\n /**\n\t * Enable the placeholder text on the editing root.\n\t */ _initPlaceholder() {\n const editor = this.editor;\n const editingView = editor.editing.view;\n const editingRoot = editingView.document.getRoot();\n const placeholder = editor.config.get('roots')[editingRoot.rootName].placeholder;\n if (placeholder) {\n editingRoot.placeholder = placeholder;\n }\n enableViewPlaceholder({\n view: editingView,\n element: editingRoot,\n isDirectHost: false,\n keepOnFocus: true\n });\n }\n}\n\n/**\n * Contextual editor UI view. Uses the {@link module:ui/editableui/inline/inlineeditableuiview~InlineEditableUIView}.\n */ class BalloonEditorUIView extends EditorUIView {\n /**\n\t * Editable UI view.\n\t */ editable;\n /**\n\t * Menu bar view instance.\n\t */ menuBarView;\n /**\n\t * Creates an instance of the balloon editor UI view.\n\t *\n\t * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t * @param editingView The editing view instance this view is related to.\n\t * @param editableElement The editable element. If not specified, it will be automatically created by\n\t * {@link module:ui/editableui/editableuiview~EditableUIView}. Otherwise, the given element will be used.\n\t * @param label When set, this value will be used as an accessible `aria-label` of the\n\t * {@link module:ui/editableui/editableuiview~EditableUIView editable view}.\n\t */ constructor(locale, editingView, editableElement, label){\n super(locale);\n this.editable = new InlineEditableUIView(locale, editingView, editableElement, {\n label\n });\n this.menuBarView = new MenuBarView(locale);\n this.menuBarView.extendTemplate({\n attributes: {\n class: [\n 'ck-reset_all',\n 'ck-rounded-corners'\n ],\n dir: locale.uiLanguageDirection\n }\n });\n }\n /**\n\t * @inheritDoc\n\t */ render() {\n super.render();\n this.registerChild(this.editable);\n this.registerChild(this.menuBarView);\n }\n}\n\n/**\n * The balloon editor implementation (Medium-like editor).\n * It uses an inline editable and a toolbar based on the {@link module:ui/toolbar/balloon/balloontoolbar~BalloonToolbar}.\n * See the {@glink examples/builds/balloon-editor demo}.\n *\n * In order to create a balloon editor instance, use the static\n * {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`} method.\n */ class BalloonEditor extends /* #__PURE__ */ ElementApiMixin(Editor) {\n /**\n\t * @inheritDoc\n\t */ static get editorName() {\n return 'BalloonEditor';\n }\n /**\n\t * @inheritDoc\n\t */ ui;\n constructor(sourceElementOrDataOrConfig, config = {}){\n const { sourceElementOrData, editorConfig } = normalizeSingleRootEditorConstructorParams(sourceElementOrDataOrConfig, config);\n super(editorConfig);\n normalizeRootsConfig(sourceElementOrData, this.config);\n if (isElement(this.config.get('attachTo'))) {\n // Documented in core/editor/editorconfig.ts.\n logWarning('editor-create-attachto-ignored');\n }\n // From this point use only normalized `roots.main.element`.\n const sourceElement = this.config.get('roots').main.element;\n if (isElement(sourceElement)) {\n if (sourceElement.tagName === 'TEXTAREA') {\n // Documented in core/editor/editor.js\n // eslint-disable-next-line ckeditor5-rules/ckeditor-error-message\n throw new CKEditorError('editor-wrong-element', null);\n }\n this.sourceElement = sourceElement;\n secureSourceElement(this, sourceElement);\n }\n const plugins = this.config.get('plugins');\n plugins.push(BalloonToolbar);\n this.config.set('plugins', plugins);\n this.config.define('balloonToolbar', this.config.get('toolbar'));\n this.model.document.createRoot();\n const view = new BalloonEditorUIView(this.locale, this.editing.view, this.sourceElement, this.config.get('roots').main.label);\n this.ui = new BalloonEditorUI(this, view);\n attachToForm(this);\n }\n /**\n\t * Destroys the editor instance, releasing all resources used by it.\n\t *\n\t * Updates the original editor element with the data if the\n\t * {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy `updateSourceElementOnDestroy`}\n\t * configuration option is set to `true`.\n\t */ destroy() {\n // Cache the data, then destroy.\n // It's safe to assume that the model->view conversion will not work after super.destroy().\n const data = this.getData();\n this.ui.destroy();\n return super.destroy().then(()=>{\n if (this.sourceElement) {\n this.updateSourceElement(data);\n }\n });\n }\n static create(sourceElementOrDataOrConfig, config = {}) {\n return new Promise((resolve)=>{\n const editor = new this(sourceElementOrDataOrConfig, config);\n resolve(editor.initPlugins().then(()=>editor.ui.init()).then(()=>editor.data.init(editor.config.get('roots').main.initialData)).then(()=>editor.fire('ready')).then(()=>editor));\n });\n }\n}\nfunction isElement(value) {\n return isElement$1(value);\n}\n\nexport { BalloonEditor, BalloonEditorUI, BalloonEditorUIView };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module editor-balloon/ballooneditorui\n */\n\nimport {\n\ttype Editor\n} from '@ckeditor/ckeditor5-core';\n\nimport {\n\tEditorUI,\n\ttype EditorUIReadyEvent\n} from '@ckeditor/ckeditor5-ui';\n\nimport { enableViewPlaceholder } from '@ckeditor/ckeditor5-engine';\n\nimport { type BalloonEditorUIView } from './ballooneditoruiview.js';\n\n/**\n * The balloon editor UI class.\n */\nexport class BalloonEditorUI extends EditorUI {\n\t/**\n\t * The main (top–most) view of the editor UI.\n\t */\n\tpublic readonly view: BalloonEditorUIView;\n\n\t/**\n\t * Creates an instance of the balloon editor UI class.\n\t *\n\t * @param editor The editor instance.\n\t * @param view The view of the UI.\n\t */\n\tconstructor( editor: Editor, view: BalloonEditorUIView ) {\n\t\tsuper( editor );\n\n\t\tthis.view = view;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override get element(): HTMLElement | null {\n\t\treturn this.view.editable.element;\n\t}\n\n\t/**\n\t * Initializes the UI.\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst view = this.view;\n\t\tconst editingView = editor.editing.view;\n\t\tconst editable = view.editable;\n\t\tconst editingRoot = editingView.document.getRoot()!;\n\n\t\t// The editable UI and editing root should share the same name. Then name is used\n\t\t// to recognize the particular editable, for instance in ARIA attributes.\n\t\teditable.name = editingRoot.rootName;\n\n\t\tview.render();\n\n\t\t// The editable UI element in DOM is available for sure only after the editor UI view has been rendered.\n\t\t// But it can be available earlier if a DOM element has been passed to BalloonEditor.create().\n\t\tconst editableElement = editable.element!;\n\n\t\t// Register the editable UI view in the editor. A single editor instance can aggregate multiple\n\t\t// editable areas (roots) but the balloon editor has only one.\n\t\tthis.setEditableElement( editable.name, editableElement );\n\n\t\t// Let the editable UI element respond to the changes in the global editor focus\n\t\t// tracker. It has been added to the same tracker a few lines above but, in reality, there are\n\t\t// many focusable areas in the editor, like balloons, toolbars or dropdowns and as long\n\t\t// as they have focus, the editable should act like it is focused too (although technically\n\t\t// it isn't), e.g. by setting the proper CSS class, visually announcing focus to the user.\n\t\t// Doing otherwise will result in editable focus styles disappearing, once e.g. the\n\t\t// toolbar gets focused.\n\t\teditable.bind( 'isFocused' ).to( this.focusTracker );\n\n\t\t// Bind the editable UI element to the editing view, making it an end– and entry–point\n\t\t// of the editor's engine. This is where the engine meets the UI.\n\t\teditingView.attachDomRoot( editableElement );\n\n\t\tthis._initPlaceholder();\n\t\tthis.initMenuBar( this.view.menuBarView! );\n\t\tthis.fire<EditorUIReadyEvent>( 'ready' );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tconst view = this.view;\n\t\tconst editingView = this.editor.editing.view;\n\n\t\tif ( editingView.getDomRoot( view.editable.name! ) ) {\n\t\t\teditingView.detachDomRoot( view.editable.name! );\n\t\t}\n\n\t\tview.destroy();\n\t}\n\n\t/**\n\t * Enable the placeholder text on the editing root.\n\t */\n\tprivate _initPlaceholder(): void {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\t\tconst editingRoot = editingView.document.getRoot()!;\n\t\tconst placeholder = editor.config.get( 'roots' )![ editingRoot.rootName ].placeholder;\n\n\t\tif ( placeholder ) {\n\t\t\teditingRoot.placeholder = placeholder;\n\t\t}\n\n\t\tenableViewPlaceholder( {\n\t\t\tview: editingView,\n\t\t\telement: editingRoot,\n\t\t\tisDirectHost: false,\n\t\t\tkeepOnFocus: true\n\t\t} );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module editor-balloon/ballooneditoruiview\n */\n\nimport { EditorUIView, InlineEditableUIView, MenuBarView } from '@ckeditor/ckeditor5-ui';\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\nimport type { EditingView } from '@ckeditor/ckeditor5-engine';\n\n/**\n * Contextual editor UI view. Uses the {@link module:ui/editableui/inline/inlineeditableuiview~InlineEditableUIView}.\n */\nexport class BalloonEditorUIView extends EditorUIView {\n\t/**\n\t * Editable UI view.\n\t */\n\tpublic readonly editable: InlineEditableUIView;\n\n\t/**\n\t * Menu bar view instance.\n\t */\n\tpublic override menuBarView: MenuBarView;\n\n\t/**\n\t * Creates an instance of the balloon editor UI view.\n\t *\n\t * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t * @param editingView The editing view instance this view is related to.\n\t * @param editableElement The editable element. If not specified, it will be automatically created by\n\t * {@link module:ui/editableui/editableuiview~EditableUIView}. Otherwise, the given element will be used.\n\t * @param label When set, this value will be used as an accessible `aria-label` of the\n\t * {@link module:ui/editableui/editableuiview~EditableUIView editable view}.\n\t */\n\tconstructor(\n\t\tlocale: Locale,\n\t\teditingView: EditingView,\n\t\teditableElement?: HTMLElement,\n\t\tlabel?: string | Record<string, string>\n\t) {\n\t\tsuper( locale );\n\n\t\tthis.editable = new InlineEditableUIView( locale, editingView, editableElement, {\n\t\t\tlabel\n\t\t} );\n\n\t\tthis.menuBarView = new MenuBarView( locale );\n\n\t\tthis.menuBarView.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-reset_all',\n\t\t\t\t\t'ck-rounded-corners'\n\t\t\t\t],\n\t\t\t\tdir: locale.uiLanguageDirection\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.registerChild( this.editable );\n\t\tthis.registerChild( this.menuBarView );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module editor-balloon/ballooneditor\n */\n\nimport {\n\tEditor,\n\tElementApiMixin,\n\tattachToForm,\n\tsecureSourceElement,\n\tnormalizeRootsConfig,\n\tnormalizeSingleRootEditorConstructorParams,\n\ttype EditorConfig,\n\ttype EditorReadyEvent\n} from '@ckeditor/ckeditor5-core';\n\nimport { BalloonToolbar } from '@ckeditor/ckeditor5-ui';\nimport { CKEditorError, logWarning } from '@ckeditor/ckeditor5-utils';\n\nimport { BalloonEditorUI } from './ballooneditorui.js';\nimport { BalloonEditorUIView } from './ballooneditoruiview.js';\n\nimport { isElement as _isElement } from 'es-toolkit/compat';\n\n/**\n * The balloon editor implementation (Medium-like editor).\n * It uses an inline editable and a toolbar based on the {@link module:ui/toolbar/balloon/balloontoolbar~BalloonToolbar}.\n * See the {@glink examples/builds/balloon-editor demo}.\n *\n * In order to create a balloon editor instance, use the static\n * {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`} method.\n */\nexport class BalloonEditor extends /* #__PURE__ */ ElementApiMixin( Editor ) {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get editorName(): 'BalloonEditor' {\n\t\treturn 'BalloonEditor';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic readonly ui: BalloonEditorUI;\n\n\t/**\n\t * Creates an instance of the balloon editor.\n\t *\n\t * **Note:** do not use the constructor to create editor instances. Use the static\n\t * {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`} method instead.\n\t *\n\t * @param config The editor configuration.\n\t */\n\tprotected constructor( config: EditorConfig );\n\n\t/**\n\t * Creates an instance of the balloon editor.\n\t *\n\t * **Note:** do not use the constructor to create editor instances. Use the static\n\t * {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`} method instead.\n\t *\n\t * **Note**: This constructor signature is deprecated and will be removed in the future release.\n\t *\n\t * @deprecated\n\t * @param sourceElementOrData The DOM element that will be the source for the created editor\n\t * (on which the editor will be initialized) or initial data for the editor. For more information see\n\t * {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`}.\n\t * @param config The editor configuration.\n\t */\n\tprotected constructor( sourceElementOrData: HTMLElement | string, config: EditorConfig );\n\n\tprotected constructor( sourceElementOrDataOrConfig: HTMLElement | string | EditorConfig, config: EditorConfig = {} ) {\n\t\tconst {\n\t\t\tsourceElementOrData,\n\t\t\teditorConfig\n\t\t} = normalizeSingleRootEditorConstructorParams( sourceElementOrDataOrConfig, config );\n\n\t\tsuper( editorConfig );\n\n\t\tnormalizeRootsConfig( sourceElementOrData, this.config );\n\n\t\tif ( isElement( this.config.get( 'attachTo' ) ) ) {\n\t\t\t// Documented in core/editor/editorconfig.ts.\n\t\t\tlogWarning( 'editor-create-attachto-ignored' );\n\t\t}\n\n\t\t// From this point use only normalized `roots.main.element`.\n\t\tconst sourceElement = this.config.get( 'roots' )!.main.element;\n\n\t\tif ( isElement( sourceElement ) ) {\n\t\t\tif ( sourceElement.tagName === 'TEXTAREA' ) {\n\t\t\t\t// Documented in core/editor/editor.js\n\t\t\t\t// eslint-disable-next-line ckeditor5-rules/ckeditor-error-message\n\t\t\t\tthrow new CKEditorError( 'editor-wrong-element', null );\n\t\t\t}\n\n\t\t\tthis.sourceElement = sourceElement;\n\t\t\tsecureSourceElement( this, sourceElement );\n\t\t}\n\n\t\tconst plugins = this.config.get( 'plugins' )!;\n\t\tplugins.push( BalloonToolbar );\n\n\t\tthis.config.set( 'plugins', plugins );\n\n\t\tthis.config.define( 'balloonToolbar', this.config.get( 'toolbar' ) );\n\n\t\tthis.model.document.createRoot();\n\n\t\tconst view = new BalloonEditorUIView( this.locale, this.editing.view, this.sourceElement, this.config.get( 'roots' )!.main.label );\n\t\tthis.ui = new BalloonEditorUI( this, view );\n\n\t\tattachToForm( this );\n\t}\n\n\t/**\n\t * Destroys the editor instance, releasing all resources used by it.\n\t *\n\t * Updates the original editor element with the data if the\n\t * {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy `updateSourceElementOnDestroy`}\n\t * configuration option is set to `true`.\n\t */\n\tpublic override destroy(): Promise<unknown> {\n\t\t// Cache the data, then destroy.\n\t\t// It's safe to assume that the model->view conversion will not work after super.destroy().\n\t\tconst data = this.getData();\n\n\t\tthis.ui.destroy();\n\n\t\treturn super.destroy()\n\t\t\t.then( () => {\n\t\t\t\tif ( this.sourceElement ) {\n\t\t\t\t\tthis.updateSourceElement( data );\n\t\t\t\t}\n\t\t\t} );\n\t}\n\n\t/**\n\t * Creates a new balloon editor instance.\n\t *\n\t * There are three general ways how the editor can be initialized.\n\t *\n\t * # Using an existing DOM element (and loading data from it)\n\t *\n\t * You can initialize the editor using an existing DOM element:\n\t *\n\t * ```ts\n\t * BalloonEditor\n\t * \t.create( {\n\t * \t\troot: {\n\t * \t\t\telement: document.querySelector( '#editor' )\n\t * \t\t}\n\t * \t} )\n\t * \t.then( editor => {\n\t * \t\tconsole.log( 'Editor was initialized', editor );\n\t * \t} )\n\t * \t.catch( err => {\n\t * \t\tconsole.error( err.stack );\n\t * \t} );\n\t * ```\n\t *\n\t * The element's content will be used as the editor data and the element will become the editable element.\n\t *\n\t * # Creating a detached editor\n\t *\n\t * Alternatively, you can initialize the editor by passing the initial data directly as a string.\n\t * In this case, the editor will render an element that must be inserted into the DOM for the editor to work properly:\n\t *\n\t * ```ts\n\t * BalloonEditor\n\t * \t.create( {\n\t * \t\troot: {\n\t * \t\t\tinitialData: '<p>Hello world!</p>'\n\t * \t\t}\n\t * \t} )\n\t * \t.then( editor => {\n\t * \t\tconsole.log( 'Editor was initialized', editor );\n\t *\n\t * \t\t// Initial data was provided so the editor UI element needs to be added manually to the DOM.\n\t * \t\tdocument.body.appendChild( editor.ui.element );\n\t * \t} )\n\t * \t.catch( err => {\n\t * \t\tconsole.error( err.stack );\n\t * \t} );\n\t * ```\n\t *\n\t * This lets you dynamically append the editor to your web page whenever it is convenient for you. You may use this method if your\n\t * web page content is generated on the client side and the DOM structure is not ready at the moment when you initialize the editor.\n\t *\n\t * # Using an existing DOM element (and data provided in `config.root.initialData`)\n\t *\n\t * You can also mix these two ways by providing a DOM element to be used and passing the initial data through the configuration:\n\t *\n\t * ```ts\n\t * BalloonEditor\n\t * \t.create( {\n\t * \t\troot: {\n\t * \t\t\telement: document.querySelector( '#editor' ),\n\t * \t\t\tinitialData: '<h2>Initial data</h2><p>Foo bar.</p>'\n\t * \t\t}\n\t * \t} )\n\t * \t.then( editor => {\n\t * \t\tconsole.log( 'Editor was initialized', editor );\n\t * \t} )\n\t * \t.catch( err => {\n\t * \t\tconsole.error( err.stack );\n\t * \t} );\n\t * ```\n\t *\n\t * This method can be used to initialize the editor on an existing element with the specified content in case if your integration\n\t * makes it difficult to set the content of the source element.\n\t *\n\t * # Configuring the editor\n\t *\n\t * See the {@link module:core/editor/editorconfig~EditorConfig editor configuration documentation} to learn more about\n\t * customizing plugins, toolbar and more.\n\t *\n\t * # Using the editor from source\n\t *\n\t * If you want to use the balloon editor, you need to define the list of\n\t * {@link module:core/editor/editorconfig~EditorConfig#plugins plugins to be initialized} and\n\t * {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar items}.\n\t *\n\t * @param config The editor configuration.\n\t * @returns A promise resolved once the editor is ready. The promise resolves with the created editor instance.\n\t */\n\tpublic static override create( config: EditorConfig ): Promise<BalloonEditor>;\n\n\t/**\n\t * Creates a new balloon editor instance.\n\t *\n\t * **Note**: This method signature is deprecated and will be removed in the future release.\n\t *\n\t * There are three general ways how the editor can be initialized.\n\t *\n\t * # Using an existing DOM element (and loading data from it)\n\t *\n\t * You can initialize the editor using an existing DOM element:\n\t *\n\t * ```ts\n\t * BalloonEditor\n\t * \t.create( document.querySelector( '#editor' ) )\n\t * \t.then( editor => {\n\t * \t\tconsole.log( 'Editor was initialized', editor );\n\t * \t} )\n\t * \t.catch( err => {\n\t * \t\tconsole.error( err.stack );\n\t * \t} );\n\t * ```\n\t *\n\t * The element's content will be used as the editor data and the element will become the editable element.\n\t *\n\t * # Creating a detached editor\n\t *\n\t * Alternatively, you can initialize the editor by passing the initial data directly as a string.\n\t * In this case, the editor will render an element that must be inserted into the DOM for the editor to work properly:\n\t *\n\t * ```ts\n\t * BalloonEditor\n\t * \t.create( '<p>Hello world!</p>' )\n\t * \t.then( editor => {\n\t * \t\tconsole.log( 'Editor was initialized', editor );\n\t *\n\t * \t\t// Initial data was provided so the editor UI element needs to be added manually to the DOM.\n\t * \t\tdocument.body.appendChild( editor.ui.element );\n\t * \t} )\n\t * \t.catch( err => {\n\t * \t\tconsole.error( err.stack );\n\t * \t} );\n\t * ```\n\t *\n\t * This lets you dynamically append the editor to your web page whenever it is convenient for you. You may use this method if your\n\t * web page content is generated on the client side and the DOM structure is not ready at the moment when you initialize the editor.\n\t *\n\t * # Using an existing DOM element (and data provided in `config.root.initialData`)\n\t *\n\t * You can also mix these two ways by providing a DOM element to be used and passing the initial data through the configuration:\n\t *\n\t * ```ts\n\t * BalloonEditor\n\t * \t.create( document.querySelector( '#editor' ), {\n\t * \t\troot: {\n\t * \t\t\tinitialData: '<h2>Initial data</h2><p>Foo bar.</p>'\n\t * \t\t}\n\t * \t} )\n\t * \t.then( editor => {\n\t * \t\tconsole.log( 'Editor was initialized', editor );\n\t * \t} )\n\t * \t.catch( err => {\n\t * \t\tconsole.error( err.stack );\n\t * \t} );\n\t * ```\n\t *\n\t * This method can be used to initialize the editor on an existing element with the specified content in case if your integration\n\t * makes it difficult to set the content of the source element.\n\t *\n\t * Note that an error will be thrown if you pass the initial data both as the first parameter and also in the configuration.\n\t *\n\t * # Configuring the editor\n\t *\n\t * See the {@link module:core/editor/editorconfig~EditorConfig editor configuration documentation} to learn more about\n\t * customizing plugins, toolbar and more.\n\t *\n\t * # Using the editor from source\n\t *\n\t * If you want to use the balloon editor, you need to define the list of\n\t * {@link module:core/editor/editorconfig~EditorConfig#plugins plugins to be initialized} and\n\t * {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar items}.\n\t *\n\t * @deprecated\n\t * @param sourceElementOrData The DOM element that will be the source for the created editor\n\t * or the editor's initial data.\n\t *\n\t * If a DOM element is passed, its content will be automatically loaded to the editor upon initialization.\n\t * The editor data will be set back to the original element once the editor is destroyed only if the\n\t * {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy updateSourceElementOnDestroy}\n\t * option is set to `true`.\n\t *\n\t * If the initial data is passed, a detached editor will be created. In this case you need to insert it into the DOM manually.\n\t * It is available under the {@link module:editor-balloon/ballooneditorui~BalloonEditorUI#element `editor.ui.element`} property.\n\t *\n\t * @param config The editor configuration.\n\t * @returns A promise resolved once the editor is ready. The promise resolves with the created editor instance.\n\t */\n\tpublic static override create( sourceElementOrData: HTMLElement | string, config: EditorConfig ): Promise<BalloonEditor>;\n\n\tpublic static override create(\n\t\tsourceElementOrDataOrConfig: HTMLElement | string | EditorConfig,\n\t\tconfig: EditorConfig = {}\n\t): Promise<BalloonEditor> {\n\t\treturn new Promise( resolve => {\n\t\t\tconst editor = new this( sourceElementOrDataOrConfig as any, config );\n\n\t\t\tresolve(\n\t\t\t\teditor.initPlugins()\n\t\t\t\t\t.then( () => editor.ui.init() )\n\t\t\t\t\t.then( () => editor.data.init( editor.config.get( 'roots' )!.main.initialData! ) )\n\t\t\t\t\t.then( () => editor.fire<EditorReadyEvent>( 'ready' ) )\n\t\t\t\t\t.then( () => editor )\n\t\t\t);\n\t\t} );\n\t}\n}\n\nfunction isElement( value: any ): value is Element {\n\treturn _isElement( value );\n}\n"]}
package/package.json CHANGED
@@ -1,26 +1,9 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-editor-balloon",
3
- "version": "47.6.1",
3
+ "version": "48.0.0-alpha.1",
4
4
  "description": "Balloon editor implementation for CKEditor 5.",
5
- "keywords": [
6
- "ckeditor",
7
- "ckeditor5",
8
- "ckeditor 5",
9
- "ckeditor5-editor",
10
- "ckeditor5-dll"
11
- ],
12
- "type": "module",
13
- "main": "src/index.js",
14
- "dependencies": {
15
- "@ckeditor/ckeditor5-core": "47.6.1",
16
- "@ckeditor/ckeditor5-engine": "47.6.1",
17
- "@ckeditor/ckeditor5-ui": "47.6.1",
18
- "@ckeditor/ckeditor5-utils": "47.6.1",
19
- "ckeditor5": "47.6.1",
20
- "es-toolkit": "1.39.5"
21
- },
22
- "author": "CKSource (http://cksource.com/)",
23
5
  "license": "SEE LICENSE IN LICENSE.md",
6
+ "author": "CKSource (http://cksource.com/)",
24
7
  "homepage": "https://ckeditor.com/ckeditor-5",
25
8
  "bugs": "https://github.com/ckeditor/ckeditor5/issues",
26
9
  "repository": {
@@ -28,33 +11,29 @@
28
11
  "url": "https://github.com/ckeditor/ckeditor5.git",
29
12
  "directory": "packages/ckeditor5-editor-balloon"
30
13
  },
14
+ "keywords": [
15
+ "ckeditor",
16
+ "ckeditor5",
17
+ "ckeditor 5",
18
+ "ckeditor5-editor"
19
+ ],
20
+ "type": "module",
21
+ "main": "./dist/index.js",
22
+ "exports": {
23
+ ".": "./dist/index.js",
24
+ "./dist/*": "./dist/*",
25
+ "./package.json": "./package.json"
26
+ },
27
+ "dependencies": {
28
+ "@ckeditor/ckeditor5-core": "48.0.0-alpha.1",
29
+ "@ckeditor/ckeditor5-engine": "48.0.0-alpha.1",
30
+ "@ckeditor/ckeditor5-ui": "48.0.0-alpha.1",
31
+ "@ckeditor/ckeditor5-utils": "48.0.0-alpha.1",
32
+ "es-toolkit": "1.45.1"
33
+ },
31
34
  "files": [
32
35
  "dist",
33
- "lang",
34
- "src/**/*.js",
35
- "src/**/*.d.ts",
36
- "theme",
37
- "build",
38
36
  "CHANGELOG.md"
39
37
  ],
40
- "types": "src/index.d.ts",
41
- "exports": {
42
- ".": {
43
- "types": "./src/index.d.ts",
44
- "import": "./src/index.js",
45
- "default": "./src/index.js"
46
- },
47
- "./dist/*": {
48
- "types": "./src/index.d.ts",
49
- "import": "./dist/*",
50
- "default": "./dist/*"
51
- },
52
- "./src/*": {
53
- "types": "./src/*.d.ts",
54
- "import": "./src/*",
55
- "default": "./src/*"
56
- },
57
- "./build/*": "./build/*",
58
- "./package.json": "./package.json"
59
- }
38
+ "types": "./dist/index.d.ts"
60
39
  }
@@ -1,4 +0,0 @@
1
- /*!
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md.
4
- */(()=>{var e={237:e=>{"use strict";e.exports=CKEditor5.dll},311:(e,t,i)=>{e.exports=i(237)("./src/ui.js")},584:(e,t,i)=>{e.exports=i(237)("./src/utils.js")},782:(e,t,i)=>{e.exports=i(237)("./src/core.js")},783:(e,t,i)=>{e.exports=i(237)("./src/engine.js")}},t={};function i(o){var r=t[o];if(void 0!==r)return r.exports;var n=t[o]={exports:{}};return e[o](n,n.exports,i),n.exports}i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";i.r(o),i.d(o,{BalloonEditor:()=>c,BalloonEditorUI:()=>s,BalloonEditorUIView:()=>l});var e=i(782),t=i(311),r=i(584),n=i(783);class s extends t.EditorUI{view;constructor(e,t){super(e),this.view=t}get element(){return this.view.editable.element}init(){const e=this.editor,t=this.view,i=e.editing.view,o=t.editable,r=i.document.getRoot();o.name=r.rootName,t.render();const n=o.element;this.setEditableElement(o.name,n),o.bind("isFocused").to(this.focusTracker),i.attachDomRoot(n),this._initPlaceholder(),this.initMenuBar(this.view.menuBarView),this.fire("ready")}destroy(){super.destroy();const e=this.view,t=this.editor.editing.view;t.getDomRoot(e.editable.name)&&t.detachDomRoot(e.editable.name),e.destroy()}_initPlaceholder(){const e=this.editor,t=e.editing.view,i=t.document.getRoot(),o=e.config.get("placeholder");if(o){const e="string"==typeof o?o:o[i.rootName];e&&(i.placeholder=e)}(0,n.enableViewPlaceholder)({view:t,element:i,isDirectHost:!1,keepOnFocus:!0})}}class l extends t.EditorUIView{editable;menuBarView;constructor(e,i,o,r){super(e),this.editable=new t.InlineEditableUIView(e,i,o,{label:r}),this.menuBarView=new t.MenuBarView(e),this.menuBarView.extendTemplate({attributes:{class:["ck-reset_all","ck-rounded-corners"],dir:e.uiLanguageDirection}})}render(){super.render(),this.registerChild(this.editable),this.registerChild(this.menuBarView)}}function a(e){return function(e){return"object"==typeof e&&null!==e}(e)&&1===e.nodeType&&!function(e){if("object"!=typeof e)return!1;if(null==e)return!1;if(null===Object.getPrototypeOf(e))return!0;if("[object Object]"!==Object.prototype.toString.call(e)){const t=e[Symbol.toStringTag];return null!=t&&(!!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable&&e.toString()===`[object ${t}]`)}let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e)}class c extends((0,e.ElementApiMixin)(e.Editor)){static get editorName(){return"BalloonEditor"}ui;constructor(i,o={}){if(!d(i)&&void 0!==o.initialData)throw new r.CKEditorError("editor-create-initial-data",null);super(o),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return d(e)?(0,r.getDataFromElement)(e):e}(i)),d(i)&&(this.sourceElement=i,(0,e.secureSourceElement)(this,i));const n=this.config.get("plugins");n.push(t.BalloonToolbar),this.config.set("plugins",n),this.config.define("balloonToolbar",this.config.get("toolbar")),this.model.document.createRoot();const a=new l(this.locale,this.editing.view,this.sourceElement,this.config.get("label"));this.ui=new s(this,a),(0,e.attachToForm)(this)}destroy(){const e=this.getData();return this.ui.destroy(),super.destroy().then(()=>{this.sourceElement&&this.updateSourceElement(e)})}static create(e,t={}){return new Promise(i=>{if(d(e)&&"TEXTAREA"===e.tagName)throw new r.CKEditorError("editor-wrong-element",null);const o=new this(e,t);i(o.initPlugins().then(()=>o.ui.init()).then(()=>o.data.init(o.config.get("initialData"))).then(()=>o.fire("ready")).then(()=>o))})}}function d(e){return a(e)}})(),(window.CKEditor5=window.CKEditor5||{}).editorBalloon=o})();
@@ -1,200 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- /**
6
- * @module editor-balloon/ballooneditor
7
- */
8
- import { Editor, ElementApiMixin, attachToForm, secureSourceElement } from 'ckeditor5/src/core.js';
9
- import { BalloonToolbar } from 'ckeditor5/src/ui.js';
10
- import { CKEditorError, getDataFromElement } from 'ckeditor5/src/utils.js';
11
- import { BalloonEditorUI } from './ballooneditorui.js';
12
- import { BalloonEditorUIView } from './ballooneditoruiview.js';
13
- import { isElement as _isElement } from 'es-toolkit/compat';
14
- /**
15
- * The balloon editor implementation (Medium-like editor).
16
- * It uses an inline editable and a toolbar based on the {@link module:ui/toolbar/balloon/balloontoolbar~BalloonToolbar}.
17
- * See the {@glink examples/builds/balloon-editor demo}.
18
- *
19
- * In order to create a balloon editor instance, use the static
20
- * {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`} method.
21
- */
22
- export class BalloonEditor extends /* #__PURE__ */ ElementApiMixin(Editor) {
23
- /**
24
- * @inheritDoc
25
- */
26
- static get editorName() {
27
- return 'BalloonEditor';
28
- }
29
- /**
30
- * @inheritDoc
31
- */
32
- ui;
33
- /**
34
- * Creates an instance of the balloon editor.
35
- *
36
- * **Note:** do not use the constructor to create editor instances. Use the static
37
- * {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`} method instead.
38
- *
39
- * @param sourceElementOrData The DOM element that will be the source for the created editor
40
- * (on which the editor will be initialized) or initial data for the editor. For more information see
41
- * {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`}.
42
- * @param config The editor configuration.
43
- */
44
- constructor(sourceElementOrData, config = {}) {
45
- // If both `config.initialData` is set and initial data is passed as the constructor parameter, then throw.
46
- if (!isElement(sourceElementOrData) && config.initialData !== undefined) {
47
- // Documented in core/editor/editorconfig.jsdoc.
48
- // eslint-disable-next-line ckeditor5-rules/ckeditor-error-message
49
- throw new CKEditorError('editor-create-initial-data', null);
50
- }
51
- super(config);
52
- if (this.config.get('initialData') === undefined) {
53
- this.config.set('initialData', getInitialData(sourceElementOrData));
54
- }
55
- if (isElement(sourceElementOrData)) {
56
- this.sourceElement = sourceElementOrData;
57
- secureSourceElement(this, sourceElementOrData);
58
- }
59
- const plugins = this.config.get('plugins');
60
- plugins.push(BalloonToolbar);
61
- this.config.set('plugins', plugins);
62
- this.config.define('balloonToolbar', this.config.get('toolbar'));
63
- this.model.document.createRoot();
64
- const view = new BalloonEditorUIView(this.locale, this.editing.view, this.sourceElement, this.config.get('label'));
65
- this.ui = new BalloonEditorUI(this, view);
66
- attachToForm(this);
67
- }
68
- /**
69
- * Destroys the editor instance, releasing all resources used by it.
70
- *
71
- * Updates the original editor element with the data if the
72
- * {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy `updateSourceElementOnDestroy`}
73
- * configuration option is set to `true`.
74
- */
75
- destroy() {
76
- // Cache the data, then destroy.
77
- // It's safe to assume that the model->view conversion will not work after super.destroy().
78
- const data = this.getData();
79
- this.ui.destroy();
80
- return super.destroy()
81
- .then(() => {
82
- if (this.sourceElement) {
83
- this.updateSourceElement(data);
84
- }
85
- });
86
- }
87
- /**
88
- * Creates a new balloon editor instance.
89
- *
90
- * There are three general ways how the editor can be initialized.
91
- *
92
- * # Using an existing DOM element (and loading data from it)
93
- *
94
- * You can initialize the editor using an existing DOM element:
95
- *
96
- * ```ts
97
- * BalloonEditor
98
- * .create( document.querySelector( '#editor' ) )
99
- * .then( editor => {
100
- * console.log( 'Editor was initialized', editor );
101
- * } )
102
- * .catch( err => {
103
- * console.error( err.stack );
104
- * } );
105
- * ```
106
- *
107
- * The element's content will be used as the editor data and the element will become the editable element.
108
- *
109
- * # Creating a detached editor
110
- *
111
- * Alternatively, you can initialize the editor by passing the initial data directly as a string.
112
- * In this case, the editor will render an element that must be inserted into the DOM for the editor to work properly:
113
- *
114
- * ```ts
115
- * BalloonEditor
116
- * .create( '<p>Hello world!</p>' )
117
- * .then( editor => {
118
- * console.log( 'Editor was initialized', editor );
119
- *
120
- * // Initial data was provided so the editor UI element needs to be added manually to the DOM.
121
- * document.body.appendChild( editor.ui.element );
122
- * } )
123
- * .catch( err => {
124
- * console.error( err.stack );
125
- * } );
126
- * ```
127
- *
128
- * This lets you dynamically append the editor to your web page whenever it is convenient for you. You may use this method if your
129
- * web page content is generated on the client side and the DOM structure is not ready at the moment when you initialize the editor.
130
- *
131
- * # Using an existing DOM element (and data provided in `config.initialData`)
132
- *
133
- * You can also mix these two ways by providing a DOM element to be used and passing the initial data through the configuration:
134
- *
135
- * ```ts
136
- * BalloonEditor
137
- * .create( document.querySelector( '#editor' ), {
138
- * initialData: '<h2>Initial data</h2><p>Foo bar.</p>'
139
- * } )
140
- * .then( editor => {
141
- * console.log( 'Editor was initialized', editor );
142
- * } )
143
- * .catch( err => {
144
- * console.error( err.stack );
145
- * } );
146
- * ```
147
- *
148
- * This method can be used to initialize the editor on an existing element with the specified content in case if your integration
149
- * makes it difficult to set the content of the source element.
150
- *
151
- * Note that an error will be thrown if you pass the initial data both as the first parameter and also in the configuration.
152
- *
153
- * # Configuring the editor
154
- *
155
- * See the {@link module:core/editor/editorconfig~EditorConfig editor configuration documentation} to learn more about
156
- * customizing plugins, toolbar and more.
157
- *
158
- * # Using the editor from source
159
- *
160
- * If you want to use the balloon editor,
161
- * you need to define the list of
162
- * {@link module:core/editor/editorconfig~EditorConfig#plugins plugins to be initialized} and
163
- * {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar items}.
164
- *
165
- * @param sourceElementOrData The DOM element that will be the source for the created editor
166
- * or the editor's initial data.
167
- *
168
- * If a DOM element is passed, its content will be automatically loaded to the editor upon initialization.
169
- * The editor data will be set back to the original element once the editor is destroyed only if the
170
- * {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy updateSourceElementOnDestroy}
171
- * option is set to `true`.
172
- *
173
- * If the initial data is passed, a detached editor will be created. In this case you need to insert it into the DOM manually.
174
- * It is available under the {@link module:editor-balloon/ballooneditorui~BalloonEditorUI#element `editor.ui.element`} property.
175
- *
176
- * @param config The editor configuration.
177
- * @returns A promise resolved once the editor is ready. The promise resolves with the created editor instance.
178
- */
179
- static create(sourceElementOrData, config = {}) {
180
- return new Promise(resolve => {
181
- if (isElement(sourceElementOrData) && sourceElementOrData.tagName === 'TEXTAREA') {
182
- // Documented in core/editor/editor.js
183
- // eslint-disable-next-line ckeditor5-rules/ckeditor-error-message
184
- throw new CKEditorError('editor-wrong-element', null);
185
- }
186
- const editor = new this(sourceElementOrData, config);
187
- resolve(editor.initPlugins()
188
- .then(() => editor.ui.init())
189
- .then(() => editor.data.init(editor.config.get('initialData')))
190
- .then(() => editor.fire('ready'))
191
- .then(() => editor));
192
- });
193
- }
194
- }
195
- function getInitialData(sourceElementOrData) {
196
- return isElement(sourceElementOrData) ? getDataFromElement(sourceElementOrData) : sourceElementOrData;
197
- }
198
- function isElement(value) {
199
- return _isElement(value);
200
- }
@@ -1,98 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- import { EditorUI } from 'ckeditor5/src/ui.js';
6
- import { enableViewPlaceholder } from 'ckeditor5/src/engine.js';
7
- /**
8
- * The balloon editor UI class.
9
- */
10
- export class BalloonEditorUI extends EditorUI {
11
- /**
12
- * The main (top–most) view of the editor UI.
13
- */
14
- view;
15
- /**
16
- * Creates an instance of the balloon editor UI class.
17
- *
18
- * @param editor The editor instance.
19
- * @param view The view of the UI.
20
- */
21
- constructor(editor, view) {
22
- super(editor);
23
- this.view = view;
24
- }
25
- /**
26
- * @inheritDoc
27
- */
28
- get element() {
29
- return this.view.editable.element;
30
- }
31
- /**
32
- * Initializes the UI.
33
- */
34
- init() {
35
- const editor = this.editor;
36
- const view = this.view;
37
- const editingView = editor.editing.view;
38
- const editable = view.editable;
39
- const editingRoot = editingView.document.getRoot();
40
- // The editable UI and editing root should share the same name. Then name is used
41
- // to recognize the particular editable, for instance in ARIA attributes.
42
- editable.name = editingRoot.rootName;
43
- view.render();
44
- // The editable UI element in DOM is available for sure only after the editor UI view has been rendered.
45
- // But it can be available earlier if a DOM element has been passed to BalloonEditor.create().
46
- const editableElement = editable.element;
47
- // Register the editable UI view in the editor. A single editor instance can aggregate multiple
48
- // editable areas (roots) but the balloon editor has only one.
49
- this.setEditableElement(editable.name, editableElement);
50
- // Let the editable UI element respond to the changes in the global editor focus
51
- // tracker. It has been added to the same tracker a few lines above but, in reality, there are
52
- // many focusable areas in the editor, like balloons, toolbars or dropdowns and as long
53
- // as they have focus, the editable should act like it is focused too (although technically
54
- // it isn't), e.g. by setting the proper CSS class, visually announcing focus to the user.
55
- // Doing otherwise will result in editable focus styles disappearing, once e.g. the
56
- // toolbar gets focused.
57
- editable.bind('isFocused').to(this.focusTracker);
58
- // Bind the editable UI element to the editing view, making it an end– and entry–point
59
- // of the editor's engine. This is where the engine meets the UI.
60
- editingView.attachDomRoot(editableElement);
61
- this._initPlaceholder();
62
- this.initMenuBar(this.view.menuBarView);
63
- this.fire('ready');
64
- }
65
- /**
66
- * @inheritDoc
67
- */
68
- destroy() {
69
- super.destroy();
70
- const view = this.view;
71
- const editingView = this.editor.editing.view;
72
- if (editingView.getDomRoot(view.editable.name)) {
73
- editingView.detachDomRoot(view.editable.name);
74
- }
75
- view.destroy();
76
- }
77
- /**
78
- * Enable the placeholder text on the editing root.
79
- */
80
- _initPlaceholder() {
81
- const editor = this.editor;
82
- const editingView = editor.editing.view;
83
- const editingRoot = editingView.document.getRoot();
84
- const placeholder = editor.config.get('placeholder');
85
- if (placeholder) {
86
- const placeholderText = typeof placeholder === 'string' ? placeholder : placeholder[editingRoot.rootName];
87
- if (placeholderText) {
88
- editingRoot.placeholder = placeholderText;
89
- }
90
- }
91
- enableViewPlaceholder({
92
- view: editingView,
93
- element: editingRoot,
94
- isDirectHost: false,
95
- keepOnFocus: true
96
- });
97
- }
98
- }
@@ -1,55 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- /**
6
- * @module editor-balloon/ballooneditoruiview
7
- */
8
- import { EditorUIView, InlineEditableUIView, MenuBarView } from 'ckeditor5/src/ui.js';
9
- /**
10
- * Contextual editor UI view. Uses the {@link module:ui/editableui/inline/inlineeditableuiview~InlineEditableUIView}.
11
- */
12
- export class BalloonEditorUIView extends EditorUIView {
13
- /**
14
- * Editable UI view.
15
- */
16
- editable;
17
- /**
18
- * Menu bar view instance.
19
- */
20
- menuBarView;
21
- /**
22
- * Creates an instance of the balloon editor UI view.
23
- *
24
- * @param locale The {@link module:core/editor/editor~Editor#locale} instance.
25
- * @param editingView The editing view instance this view is related to.
26
- * @param editableElement The editable element. If not specified, it will be automatically created by
27
- * {@link module:ui/editableui/editableuiview~EditableUIView}. Otherwise, the given element will be used.
28
- * @param label When set, this value will be used as an accessible `aria-label` of the
29
- * {@link module:ui/editableui/editableuiview~EditableUIView editable view}.
30
- */
31
- constructor(locale, editingView, editableElement, label) {
32
- super(locale);
33
- this.editable = new InlineEditableUIView(locale, editingView, editableElement, {
34
- label
35
- });
36
- this.menuBarView = new MenuBarView(locale);
37
- this.menuBarView.extendTemplate({
38
- attributes: {
39
- class: [
40
- 'ck-reset_all',
41
- 'ck-rounded-corners'
42
- ],
43
- dir: locale.uiLanguageDirection
44
- }
45
- });
46
- }
47
- /**
48
- * @inheritDoc
49
- */
50
- render() {
51
- super.render();
52
- this.registerChild(this.editable);
53
- this.registerChild(this.menuBarView);
54
- }
55
- }
package/src/index.js DELETED
@@ -1,10 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- /**
6
- * @module editor-balloon
7
- */
8
- export { BalloonEditor } from './ballooneditor.js';
9
- export { BalloonEditorUI } from './ballooneditorui.js';
10
- export { BalloonEditorUIView } from './ballooneditoruiview.js';
File without changes