@ckeditor/ckeditor5-editor-balloon 40.1.0 → 41.0.0
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/CHANGELOG.md +22 -22
- package/LICENSE.md +1 -1
- package/build/editor-balloon.js +2 -2
- package/package.json +3 -2
- package/src/ballooneditor.d.ts +5 -5
- package/src/ballooneditor.js +9 -8
- package/src/ballooneditorui.d.ts +4 -4
- package/src/ballooneditorui.js +3 -3
- package/src/ballooneditoruiview.d.ts +5 -5
- package/src/ballooneditoruiview.js +2 -2
- package/src/index.d.ts +2 -2
- package/src/index.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,32 +5,32 @@ All changes in the package are documented in the main repository. See: https://g
|
|
|
5
5
|
|
|
6
6
|
Changes for the past releases are available below.
|
|
7
7
|
|
|
8
|
-
## [19.0.0](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v18.0.0...v19.0.0) (2020
|
|
8
|
+
## [19.0.0](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v18.0.0...v19.0.0) (April 29, 2020)
|
|
9
9
|
|
|
10
10
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
## [18.0.0](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v17.0.0...v18.0.0) (2020
|
|
13
|
+
## [18.0.0](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v17.0.0...v18.0.0) (March 19, 2020)
|
|
14
14
|
|
|
15
15
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
## [17.0.0](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v16.0.0...v17.0.0) (2020
|
|
18
|
+
## [17.0.0](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v16.0.0...v17.0.0) (February 19, 2020)
|
|
19
19
|
|
|
20
20
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
## [16.0.0](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v15.0.0...v16.0.0) (2019
|
|
23
|
+
## [16.0.0](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v15.0.0...v16.0.0) (December 4, 2019)
|
|
24
24
|
|
|
25
25
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
## [15.0.0](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v12.2.2...v15.0.0) (2019
|
|
28
|
+
## [15.0.0](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v12.2.2...v15.0.0) (October 23, 2019)
|
|
29
29
|
|
|
30
30
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
## [12.2.2](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v12.2.1...v12.2.2) (2019
|
|
33
|
+
## [12.2.2](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v12.2.1...v12.2.2) (August 26, 2019)
|
|
34
34
|
|
|
35
35
|
### Other changes
|
|
36
36
|
|
|
@@ -38,31 +38,31 @@ Internal changes only (updated dependencies, documentation, etc.).
|
|
|
38
38
|
* Introduced a check that prevents sharing source elements between editor instances. See [ckeditor/ckeditor5#746](https://github.com/ckeditor/ckeditor5/issues/746). ([5159981](https://github.com/ckeditor/ckeditor5-editor-balloon/commit/5159981))
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
## [12.2.1](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v12.2.0...v12.2.1) (2019
|
|
41
|
+
## [12.2.1](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v12.2.0...v12.2.1) (July 10, 2019)
|
|
42
42
|
|
|
43
43
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
## [12.2.0](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v12.1.1...v12.2.0) (2019
|
|
46
|
+
## [12.2.0](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v12.1.1...v12.2.0) (July 4, 2019)
|
|
47
47
|
|
|
48
48
|
### Features
|
|
49
49
|
|
|
50
50
|
* `BalloonEditor.create()` will throw an error, when textarea element is used. ([83552e2](https://github.com/ckeditor/ckeditor5-editor-balloon/commit/83552e2))
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
## [12.1.1](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v12.1.0...v12.1.1) (2019
|
|
53
|
+
## [12.1.1](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v12.1.0...v12.1.1) (June 6, 2019)
|
|
54
54
|
|
|
55
55
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
## [12.1.0](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v12.0.0...v12.1.0) (2019
|
|
58
|
+
## [12.1.0](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v12.0.0...v12.1.0) (April 4, 2019)
|
|
59
59
|
|
|
60
60
|
### Features
|
|
61
61
|
|
|
62
62
|
* Introduced `EditorConfig#initialData`. ([678528f](https://github.com/ckeditor/ckeditor5-editor-balloon/commit/678528f))
|
|
63
63
|
|
|
64
64
|
|
|
65
|
-
## [12.0.0](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v11.0.2...v12.0.0) (2019
|
|
65
|
+
## [12.0.0](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v11.0.2...v12.0.0) (February 28, 2019)
|
|
66
66
|
|
|
67
67
|
### Features
|
|
68
68
|
|
|
@@ -87,17 +87,17 @@ Internal changes only (updated dependencies, documentation, etc.).
|
|
|
87
87
|
* Removed `BalloonEditorUIView#editableElement`. Instead `BalloonEditorUI#getEditableElement()` method should be used.
|
|
88
88
|
|
|
89
89
|
|
|
90
|
-
## [11.0.2](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v11.0.1...v11.0.2) (2018
|
|
90
|
+
## [11.0.2](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v11.0.1...v11.0.2) (December 5, 2018)
|
|
91
91
|
|
|
92
92
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
93
93
|
|
|
94
94
|
|
|
95
|
-
## [11.0.1](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v11.0.0...v11.0.1) (2018
|
|
95
|
+
## [11.0.1](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v11.0.0...v11.0.1) (October 8, 2018)
|
|
96
96
|
|
|
97
97
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
98
98
|
|
|
99
99
|
|
|
100
|
-
## [11.0.0](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v10.0.1...v11.0.0) (2018
|
|
100
|
+
## [11.0.0](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v10.0.1...v11.0.0) (July 18, 2018)
|
|
101
101
|
|
|
102
102
|
### Features
|
|
103
103
|
|
|
@@ -112,12 +112,12 @@ Internal changes only (updated dependencies, documentation, etc.).
|
|
|
112
112
|
* The `BalloonEditor#element` property was renamed to `BalloonEditor#sourceElement` and `BalloonEditor#updateElement()` method to `BalloonEditor#updateSourceElement()`. See [ckeditor/ckeditor5-core#64](https://github.com/ckeditor/ckeditor5-core/issues/64).
|
|
113
113
|
|
|
114
114
|
|
|
115
|
-
## [10.0.1](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v10.0.0...v10.0.1) (2018
|
|
115
|
+
## [10.0.1](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v10.0.0...v10.0.1) (June 21, 2018)
|
|
116
116
|
|
|
117
117
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
118
118
|
|
|
119
119
|
|
|
120
|
-
## [10.0.0](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v1.0.0-beta.4...v10.0.0) (2018
|
|
120
|
+
## [10.0.0](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v1.0.0-beta.4...v10.0.0) (April 25, 2018)
|
|
121
121
|
|
|
122
122
|
### Other changes
|
|
123
123
|
|
|
@@ -128,31 +128,31 @@ Internal changes only (updated dependencies, documentation, etc.).
|
|
|
128
128
|
* The license under which CKEditor 5 is released has been changed from a triple GPL, LGPL and MPL license to a GPL2+ only. See [ckeditor/ckeditor5#991](https://github.com/ckeditor/ckeditor5/issues/991) for more information.
|
|
129
129
|
|
|
130
130
|
|
|
131
|
-
## [1.0.0-beta.4](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v1.0.0-beta.2...v1.0.0-beta.4) (2018
|
|
131
|
+
## [1.0.0-beta.4](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v1.0.0-beta.2...v1.0.0-beta.4) (April 19, 2018)
|
|
132
132
|
|
|
133
133
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
134
134
|
|
|
135
135
|
|
|
136
|
-
## [1.0.0-beta.2](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v1.0.0-beta.1...v1.0.0-beta.2) (2018
|
|
136
|
+
## [1.0.0-beta.2](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v1.0.0-beta.1...v1.0.0-beta.2) (April 10, 2018)
|
|
137
137
|
|
|
138
138
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
139
139
|
|
|
140
140
|
|
|
141
|
-
## [1.0.0-beta.1](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v1.0.0-alpha.2...v1.0.0-beta.1) (2018
|
|
141
|
+
## [1.0.0-beta.1](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v1.0.0-alpha.2...v1.0.0-beta.1) (March 15, 2018)
|
|
142
142
|
|
|
143
143
|
### Other changes
|
|
144
144
|
|
|
145
145
|
* Migrated the editor styles to PostCSS (see [ckeditor/ckeditor5-ui#144](https://github.com/ckeditor/ckeditor5-ui/issues/144)). ([bd239e9](https://github.com/ckeditor/ckeditor5-editor-balloon/commit/bd239e9))
|
|
146
146
|
|
|
147
147
|
|
|
148
|
-
## [1.0.0-alpha.2](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2017
|
|
148
|
+
## [1.0.0-alpha.2](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (November 14, 2017)
|
|
149
149
|
|
|
150
150
|
### Other changes
|
|
151
151
|
|
|
152
152
|
* Aligned UI library usage to the [changes in the UI framework](https://github.com/ckeditor/ckeditor5-ui/pull/332).
|
|
153
153
|
|
|
154
154
|
|
|
155
|
-
## [1.0.0-alpha.1](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v0.1.0...v1.0.0-alpha.1) (2017
|
|
155
|
+
## [1.0.0-alpha.1](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v0.1.0...v1.0.0-alpha.1) (October 3, 2017)
|
|
156
156
|
|
|
157
157
|
### Other changes
|
|
158
158
|
|
|
@@ -163,7 +163,7 @@ Internal changes only (updated dependencies, documentation, etc.).
|
|
|
163
163
|
* The editor name has been changed. See [ckeditor/ckeditor5#546](https://github.com/ckeditor/ckeditor5/issues/546).
|
|
164
164
|
|
|
165
165
|
|
|
166
|
-
## 0.1.0 (2017
|
|
166
|
+
## 0.1.0 (September 3, 2017)
|
|
167
167
|
|
|
168
168
|
### Features
|
|
169
169
|
|
package/LICENSE.md
CHANGED
|
@@ -2,7 +2,7 @@ Software License Agreement
|
|
|
2
2
|
==========================
|
|
3
3
|
|
|
4
4
|
**Balloon editor implementation** – https://github.com/ckeditor/ckeditor5-editor-balloon <br>
|
|
5
|
-
Copyright (c) 2003–
|
|
5
|
+
Copyright (c) 2003–2024, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
|
|
6
6
|
|
|
7
7
|
Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html).
|
|
8
8
|
|
package/build/editor-balloon.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
|
-
*/(()=>{var t={704:(t,e,o)=>{t.exports=o(79)("./src/core.js")},492:(t,e,o)=>{t.exports=o(79)("./src/engine.js")},273:(t,e,o)=>{t.exports=o(79)("./src/ui.js")},209:(t,e,o)=>{t.exports=o(79)("./src/utils.js")},434:(t,e,o)=>{t.exports=o(79)("./src/watchdog.js")},79:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function o(i){var r=e[i];if(void 0!==r)return r.exports;var n=e[i]={exports:{}};return t[i](n,n.exports,o),n.exports}o.d=(t,e)=>{for(var i in e)o.o(e,i)&&!o.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};(()=>{"use strict";o.r(i),o.d(i,{BalloonEditor:()=>
|
|
4
|
+
*/(()=>{var t={704:(t,e,o)=>{t.exports=o(79)("./src/core.js")},492:(t,e,o)=>{t.exports=o(79)("./src/engine.js")},273:(t,e,o)=>{t.exports=o(79)("./src/ui.js")},209:(t,e,o)=>{t.exports=o(79)("./src/utils.js")},434:(t,e,o)=>{t.exports=o(79)("./src/watchdog.js")},79:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function o(i){var r=e[i];if(void 0!==r)return r.exports;var n=e[i]={exports:{}};return t[i](n,n.exports,o),n.exports}o.d=(t,e)=>{for(var i in e)o.o(e,i)&&!o.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};(()=>{"use strict";o.r(i),o.d(i,{BalloonEditor:()=>F});var t=o(704),e=o(273),r=o(209),n=o(434),s=o(492);class c extends e.EditorUI{constructor(t,e){super(t),this.view=e}get element(){return this.view.editable.element}init(){const t=this.editor,e=this.view,o=t.editing.view,i=e.editable,r=o.document.getRoot();i.name=r.rootName,e.render();const n=i.element;this.setEditableElement(i.name,n),i.bind("isFocused").to(this.focusTracker),o.attachDomRoot(n),this._initPlaceholder(),this.fire("ready")}destroy(){super.destroy();const t=this.view;this.editor.editing.view.detachDomRoot(t.editable.name),t.destroy()}_initPlaceholder(){const t=this.editor,e=t.editing.view,o=e.document.getRoot(),i=t.config.get("placeholder");if(i){const t="string"==typeof i?i:i[o.rootName];t&&(o.placeholder=t)}(0,s.enablePlaceholder)({view:e,element:o,isDirectHost:!1,keepOnFocus:!0})}}class a extends e.EditorUIView{constructor(t,o,i){super(t);const r=t.t;this.editable=new e.InlineEditableUIView(t,o,i,{label:t=>r("Rich Text Editor. Editing area: %0",t.name)})}render(){super.render(),this.registerChild(this.editable)}}const l=function(t){return null!=t&&"object"==typeof t};const d="object"==typeof global&&global&&global.Object===Object&&global;var u="object"==typeof self&&self&&self.Object===Object&&self;const h=(d||u||Function("return this")()).Symbol;var g=Object.prototype,p=g.hasOwnProperty,f=g.toString,b=h?h.toStringTag:void 0;const m=function(t){var e=p.call(t,b),o=t[b];try{t[b]=void 0;var i=!0}catch(t){}var r=f.call(t);return i&&(e?t[b]=o:delete t[b]),r};var v=Object.prototype.toString;const y=function(t){return v.call(t)};var w=h?h.toStringTag:void 0;const j=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":w&&w in Object(t)?m(t):y(t)};const E=function(t,e){return function(o){return t(e(o))}}(Object.getPrototypeOf,Object);var O=Function.prototype,x=Object.prototype,S=O.toString,P=x.hasOwnProperty,T=S.call(Object);const C=function(t){if(!l(t)||"[object Object]"!=j(t))return!1;var e=E(t);if(null===e)return!0;var o=P.call(e,"constructor")&&e.constructor;return"function"==typeof o&&o instanceof o&&S.call(o)==T};const D=function(t){return l(t)&&1===t.nodeType&&!C(t)};class R extends((0,t.DataApiMixin)((0,t.ElementApiMixin)(t.Editor))){constructor(o,i={}){if(!K(o)&&void 0!==i.initialData)throw new r.CKEditorError("editor-create-initial-data",null);super(i),void 0===this.config.get("initialData")&&this.config.set("initialData",function(t){return K(t)?(0,r.getDataFromElement)(t):t}(o)),K(o)&&(this.sourceElement=o,(0,t.secureSourceElement)(this,o));const n=this.config.get("plugins");n.push(e.BalloonToolbar),this.config.set("plugins",n),this.config.define("balloonToolbar",this.config.get("toolbar")),this.model.document.createRoot();const s=new a(this.locale,this.editing.view,this.sourceElement);this.ui=new c(this,s),(0,t.attachToForm)(this)}destroy(){const t=this.getData();return this.ui.destroy(),super.destroy().then((()=>{this.sourceElement&&this.updateSourceElement(t)}))}static create(t,e={}){return new Promise((o=>{if(K(t)&&"TEXTAREA"===t.tagName)throw new r.CKEditorError("editor-wrong-element",null);const i=new this(t,e);o(i.initPlugins().then((()=>i.ui.init())).then((()=>i.data.init(i.config.get("initialData")))).then((()=>i.fire("ready"))).then((()=>i)))}))}}R.Context=t.Context,R.EditorWatchdog=n.EditorWatchdog,R.ContextWatchdog=n.ContextWatchdog;const F=R;function K(t){return D(t)}})(),(window.CKEditor5=window.CKEditor5||{}).editorBalloon=i})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-editor-balloon",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "41.0.0",
|
|
4
4
|
"description": "Balloon editor implementation for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -9,9 +9,10 @@
|
|
|
9
9
|
"ckeditor5-editor",
|
|
10
10
|
"ckeditor5-dll"
|
|
11
11
|
],
|
|
12
|
+
"type": "module",
|
|
12
13
|
"main": "src/index.js",
|
|
13
14
|
"dependencies": {
|
|
14
|
-
"ckeditor5": "
|
|
15
|
+
"ckeditor5": "41.0.0",
|
|
15
16
|
"lodash-es": "4.17.21"
|
|
16
17
|
},
|
|
17
18
|
"author": "CKSource (http://cksource.com/)",
|
package/src/ballooneditor.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module editor-balloon/ballooneditor
|
|
7
7
|
*/
|
|
8
|
-
import { Editor, Context, type EditorConfig } from 'ckeditor5/src/core';
|
|
9
|
-
import { ContextWatchdog, EditorWatchdog } from 'ckeditor5/src/watchdog';
|
|
10
|
-
import BalloonEditorUI from './ballooneditorui';
|
|
11
|
-
declare const BalloonEditor_base: import("ckeditor5/src/utils").Mixed<import("ckeditor5/src/utils").Mixed<typeof Editor, import("ckeditor5/src/core").ElementApi>, import("ckeditor5/src/core").DataApi>;
|
|
8
|
+
import { Editor, Context, type EditorConfig } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { ContextWatchdog, EditorWatchdog } from 'ckeditor5/src/watchdog.js';
|
|
10
|
+
import BalloonEditorUI from './ballooneditorui.js';
|
|
11
|
+
declare const BalloonEditor_base: import("ckeditor5/src/utils.js").Mixed<import("ckeditor5/src/utils.js").Mixed<typeof Editor, import("ckeditor5/src/core.js").ElementApi>, import("ckeditor5/src/core.js").DataApi>;
|
|
12
12
|
/**
|
|
13
13
|
* The {@glink installation/getting-started/predefined-builds#balloon-editor balloon editor}
|
|
14
14
|
* implementation (Medium-like editor).
|
package/src/ballooneditor.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module editor-balloon/ballooneditor
|
|
7
7
|
*/
|
|
8
|
-
import { Editor, Context, DataApiMixin, ElementApiMixin, attachToForm, secureSourceElement } from 'ckeditor5/src/core';
|
|
9
|
-
import { BalloonToolbar } from 'ckeditor5/src/ui';
|
|
10
|
-
import { CKEditorError, getDataFromElement } from 'ckeditor5/src/utils';
|
|
11
|
-
import { ContextWatchdog, EditorWatchdog } from 'ckeditor5/src/watchdog';
|
|
12
|
-
import BalloonEditorUI from './ballooneditorui';
|
|
13
|
-
import BalloonEditorUIView from './ballooneditoruiview';
|
|
8
|
+
import { Editor, Context, DataApiMixin, 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 { ContextWatchdog, EditorWatchdog } from 'ckeditor5/src/watchdog.js';
|
|
12
|
+
import BalloonEditorUI from './ballooneditorui.js';
|
|
13
|
+
import BalloonEditorUIView from './ballooneditoruiview.js';
|
|
14
14
|
import { isElement as _isElement } from 'lodash-es';
|
|
15
15
|
/**
|
|
16
16
|
* The {@glink installation/getting-started/predefined-builds#balloon-editor balloon editor}
|
|
@@ -36,7 +36,7 @@ import { isElement as _isElement } from 'lodash-es';
|
|
|
36
36
|
* Read more about initializing the editor from source or as a build in
|
|
37
37
|
* {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`}.
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
class BalloonEditor extends DataApiMixin(ElementApiMixin(Editor)) {
|
|
40
40
|
/**
|
|
41
41
|
* Creates an instance of the balloon editor.
|
|
42
42
|
*
|
|
@@ -221,6 +221,7 @@ BalloonEditor.EditorWatchdog = EditorWatchdog;
|
|
|
221
221
|
* Exposed as static editor field for easier access in editor builds.
|
|
222
222
|
*/
|
|
223
223
|
BalloonEditor.ContextWatchdog = ContextWatchdog;
|
|
224
|
+
export default BalloonEditor;
|
|
224
225
|
function getInitialData(sourceElementOrData) {
|
|
225
226
|
return isElement(sourceElementOrData) ? getDataFromElement(sourceElementOrData) : sourceElementOrData;
|
|
226
227
|
}
|
package/src/ballooneditorui.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module editor-balloon/ballooneditorui
|
|
7
7
|
*/
|
|
8
|
-
import { type Editor } from 'ckeditor5/src/core';
|
|
9
|
-
import { EditorUI } from 'ckeditor5/src/ui';
|
|
10
|
-
import type BalloonEditorUIView from './ballooneditoruiview';
|
|
8
|
+
import { type Editor } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { EditorUI } from 'ckeditor5/src/ui.js';
|
|
10
|
+
import type BalloonEditorUIView from './ballooneditoruiview.js';
|
|
11
11
|
/**
|
|
12
12
|
* The balloon editor UI class.
|
|
13
13
|
*/
|
package/src/ballooneditorui.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import { EditorUI } from 'ckeditor5/src/ui';
|
|
6
|
-
import { enablePlaceholder } from 'ckeditor5/src/engine';
|
|
5
|
+
import { EditorUI } from 'ckeditor5/src/ui.js';
|
|
6
|
+
import { enablePlaceholder } from 'ckeditor5/src/engine.js';
|
|
7
7
|
/**
|
|
8
8
|
* The balloon editor UI class.
|
|
9
9
|
*/
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module editor-balloon/ballooneditoruiview
|
|
7
7
|
*/
|
|
8
|
-
import { EditorUIView, InlineEditableUIView } from 'ckeditor5/src/ui';
|
|
9
|
-
import type { Locale } from 'ckeditor5/src/utils';
|
|
10
|
-
import type {
|
|
8
|
+
import { EditorUIView, InlineEditableUIView } from 'ckeditor5/src/ui.js';
|
|
9
|
+
import type { Locale } from 'ckeditor5/src/utils.js';
|
|
10
|
+
import type { EditingView } from 'ckeditor5/src/engine.js';
|
|
11
11
|
/**
|
|
12
12
|
* Contextual editor UI view. Uses the {@link module:ui/editableui/inline/inlineeditableuiview~InlineEditableUIView}.
|
|
13
13
|
*/
|
|
@@ -24,7 +24,7 @@ export default class BalloonEditorUIView extends EditorUIView {
|
|
|
24
24
|
* @param editableElement The editable element. If not specified, it will be automatically created by
|
|
25
25
|
* {@link module:ui/editableui/editableuiview~EditableUIView}. Otherwise, the given element will be used.
|
|
26
26
|
*/
|
|
27
|
-
constructor(locale: Locale, editingView:
|
|
27
|
+
constructor(locale: Locale, editingView: EditingView, editableElement?: HTMLElement);
|
|
28
28
|
/**
|
|
29
29
|
* @inheritDoc
|
|
30
30
|
*/
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module editor-balloon/ballooneditoruiview
|
|
7
7
|
*/
|
|
8
|
-
import { EditorUIView, InlineEditableUIView } from 'ckeditor5/src/ui';
|
|
8
|
+
import { EditorUIView, InlineEditableUIView } from 'ckeditor5/src/ui.js';
|
|
9
9
|
/**
|
|
10
10
|
* Contextual editor UI view. Uses the {@link module:ui/editableui/inline/inlineeditableuiview~InlineEditableUIView}.
|
|
11
11
|
*/
|
package/src/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module editor-balloon
|
|
7
7
|
*/
|
|
8
|
-
export { default as BalloonEditor } from './ballooneditor';
|
|
8
|
+
export { default as BalloonEditor } from './ballooneditor.js';
|
package/src/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module editor-balloon
|
|
7
7
|
*/
|
|
8
|
-
export { default as BalloonEditor } from './ballooneditor';
|
|
8
|
+
export { default as BalloonEditor } from './ballooneditor.js';
|