@ckeditor/ckeditor5-editor-decoupled 40.2.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 +2 -2
- package/LICENSE.md +1 -1
- package/build/editor-decoupled.js +2 -2
- package/package.json +3 -2
- package/src/decouplededitor.d.ts +5 -5
- package/src/decouplededitor.js +8 -7
- package/src/decouplededitorui.d.ts +4 -4
- package/src/decouplededitorui.js +3 -3
- package/src/decouplededitoruiview.d.ts +5 -5
- package/src/decouplededitoruiview.js +2 -2
- package/src/index.d.ts +2 -2
- package/src/index.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -133,7 +133,7 @@ Internal changes only (updated dependencies, documentation, etc.).
|
|
|
133
133
|
|
|
134
134
|
### BREAKING CHANGES
|
|
135
135
|
|
|
136
|
-
* The license under which CKEditor 5 is released
|
|
136
|
+
* The license under which CKEditor 5 is released was changed from a triple GPL, LGPL, and MPL license to a GPL2+. See [ckeditor/ckeditor5#991](https://github.com/ckeditor/ckeditor5/issues/991) for more information.
|
|
137
137
|
|
|
138
138
|
|
|
139
139
|
## [1.0.0-beta.4](https://github.com/ckeditor/ckeditor5-editor-decoupled/compare/v1.0.0-beta.2...v1.0.0-beta.4) (April 19, 2018)
|
|
@@ -149,7 +149,7 @@ Internal changes only (updated dependencies, documentation, etc.).
|
|
|
149
149
|
|
|
150
150
|
### BREAKING CHANGES
|
|
151
151
|
|
|
152
|
-
* The
|
|
152
|
+
* The `config.toolbarContainer` and `config.editableContainer` configuration options were removed. Refer to the `DecoupledEditor` class API documentation to learn about possible methods of bootstrapping the UI.
|
|
153
153
|
|
|
154
154
|
|
|
155
155
|
## 1.0.0-beta.1 (March 15, 2018)
|
package/LICENSE.md
CHANGED
|
@@ -2,7 +2,7 @@ Software License Agreement
|
|
|
2
2
|
==========================
|
|
3
3
|
|
|
4
4
|
**Decoupled editor implementation** – https://github.com/ckeditor/ckeditor5-editor-decoupled <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
|
|
|
@@ -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(r){var i=e[r];if(void 0!==i)return i.exports;var n=e[r]={exports:{}};return t[r](n,n.exports,o),n.exports}o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},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 r={};(()=>{"use strict";o.r(r),o.d(r,{DecoupledEditor:()=>
|
|
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(r){var i=e[r];if(void 0!==i)return i.exports;var n=e[r]={exports:{}};return t[r](n,n.exports,o),n.exports}o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},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 r={};(()=>{"use strict";o.r(r),o.d(r,{DecoupledEditor:()=>W});var t=o(704),e=o(209),i=o(434),n=o(273),s=o(492);class c extends n.EditorUI{constructor(t,e){super(t),this.view=e}init(){const t=this.editor,e=this.view,o=t.editing.view,r=e.editable,i=o.document.getRoot();r.name=i.rootName,e.render();const n=r.element;this.setEditableElement(r.name,n),e.editable.bind("isFocused").to(this.focusTracker),o.attachDomRoot(n),this._initPlaceholder(),this._initToolbar(),this.fire("ready")}destroy(){super.destroy();const t=this.view;this.editor.editing.view.detachDomRoot(t.editable.name),t.destroy()}_initToolbar(){const t=this.editor,e=this.view;e.toolbar.fillFromConfig(t.config.get("toolbar"),this.componentFactory),this.addToolbar(e.toolbar)}_initPlaceholder(){const t=this.editor,e=t.editing.view,o=e.document.getRoot(),r=t.config.get("placeholder");if(r){const t="string"==typeof r?r:r[o.rootName];t&&(o.placeholder=t)}(0,s.enablePlaceholder)({view:e,element:o,isDirectHost:!1,keepOnFocus:!0})}}class l extends n.EditorUIView{constructor(t,e,o={}){super(t);const r=t.t;this.toolbar=new n.ToolbarView(t,{shouldGroupWhenFull:o.shouldToolbarGroupWhenFull}),this.editable=new n.InlineEditableUIView(t,e,o.editableElement,{label:t=>r("Rich Text Editor. Editing area: %0",t.name)}),this.toolbar.extendTemplate({attributes:{class:["ck-reset_all","ck-rounded-corners"],dir:t.uiLanguageDirection}})}render(){super.render(),this.registerChild([this.toolbar,this.editable])}}const a=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 b=Object.prototype,p=b.hasOwnProperty,g=b.toString,f=h?h.toStringTag:void 0;const m=function(t){var e=p.call(t,f),o=t[f];try{t[f]=void 0;var r=!0}catch(t){}var i=g.call(t);return r&&(e?t[f]=o:delete t[f]),i};var v=Object.prototype.toString;const y=function(t){return v.call(t)};var w=h?h.toStringTag:void 0;const E=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":w&&w in Object(t)?m(t):y(t)};const j=function(t,e){return function(o){return t(e(o))}}(Object.getPrototypeOf,Object);var x=Function.prototype,O=Object.prototype,T=x.toString,D=O.hasOwnProperty,S=T.call(Object);const P=function(t){if(!a(t)||"[object Object]"!=E(t))return!1;var e=j(t);if(null===e)return!0;var o=D.call(e,"constructor")&&e.constructor;return"function"==typeof o&&o instanceof o&&T.call(o)==S};const C=function(t){return a(t)&&1===t.nodeType&&!P(t)};class F extends((0,t.DataApiMixin)((0,t.ElementApiMixin)(t.Editor))){constructor(o,r={}){if(!R(o)&&void 0!==r.initialData)throw new e.CKEditorError("editor-create-initial-data",null);super(r),void 0===this.config.get("initialData")&&this.config.set("initialData",function(t){return R(t)?(0,e.getDataFromElement)(t):t}(o)),R(o)&&(this.sourceElement=o,(0,t.secureSourceElement)(this,o)),this.model.document.createRoot();const i=!this.config.get("toolbar.shouldNotGroupWhenFull"),n=new l(this.locale,this.editing.view,{editableElement:this.sourceElement,shouldToolbarGroupWhenFull:i});this.ui=new c(this,n)}destroy(){const t=this.getData();return this.ui.destroy(),super.destroy().then((()=>{this.sourceElement&&this.updateSourceElement(t)}))}static create(t,o={}){return new Promise((r=>{if(R(t)&&"TEXTAREA"===t.tagName)throw new e.CKEditorError("editor-wrong-element",null);const i=new this(t,o);r(i.initPlugins().then((()=>i.ui.init())).then((()=>i.data.init(i.config.get("initialData")))).then((()=>i.fire("ready"))).then((()=>i)))}))}}F.Context=t.Context,F.EditorWatchdog=i.EditorWatchdog,F.ContextWatchdog=i.ContextWatchdog;const W=F;function R(t){return C(t)}})(),(window.CKEditor5=window.CKEditor5||{}).editorDecoupled=r})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-editor-decoupled",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "41.0.0",
|
|
4
4
|
"description": "Decoupled 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/decouplededitor.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-decoupled/decouplededitor
|
|
7
7
|
*/
|
|
8
|
-
import { Editor, Context, type EditorConfig } from 'ckeditor5/src/core';
|
|
9
|
-
import { ContextWatchdog, EditorWatchdog } from 'ckeditor5/src/watchdog';
|
|
10
|
-
import DecoupledEditorUI from './decouplededitorui';
|
|
11
|
-
declare const DecoupledEditor_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 DecoupledEditorUI from './decouplededitorui.js';
|
|
11
|
+
declare const DecoupledEditor_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#document-editor decoupled editor} implementation.
|
|
14
14
|
* It provides an inline editable and a toolbar. However, unlike other editors,
|
package/src/decouplededitor.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
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-decoupled/decouplededitor
|
|
7
7
|
*/
|
|
8
|
-
import { Editor, Context, ElementApiMixin, DataApiMixin, secureSourceElement } from 'ckeditor5/src/core';
|
|
9
|
-
import { CKEditorError, getDataFromElement } from 'ckeditor5/src/utils';
|
|
10
|
-
import { ContextWatchdog, EditorWatchdog } from 'ckeditor5/src/watchdog';
|
|
11
|
-
import DecoupledEditorUI from './decouplededitorui';
|
|
12
|
-
import DecoupledEditorUIView from './decouplededitoruiview';
|
|
8
|
+
import { Editor, Context, ElementApiMixin, DataApiMixin, secureSourceElement } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { CKEditorError, getDataFromElement } from 'ckeditor5/src/utils.js';
|
|
10
|
+
import { ContextWatchdog, EditorWatchdog } from 'ckeditor5/src/watchdog.js';
|
|
11
|
+
import DecoupledEditorUI from './decouplededitorui.js';
|
|
12
|
+
import DecoupledEditorUIView from './decouplededitoruiview.js';
|
|
13
13
|
import { isElement as _isElement } from 'lodash-es';
|
|
14
14
|
/**
|
|
15
15
|
* The {@glink installation/getting-started/predefined-builds#document-editor decoupled editor} implementation.
|
|
@@ -43,7 +43,7 @@ import { isElement as _isElement } from 'lodash-es';
|
|
|
43
43
|
* Read more about initializing the editor from source or as a build in
|
|
44
44
|
* {@link module:editor-decoupled/decouplededitor~DecoupledEditor.create `DecoupledEditor.create()`}.
|
|
45
45
|
*/
|
|
46
|
-
|
|
46
|
+
class DecoupledEditor extends DataApiMixin(ElementApiMixin(Editor)) {
|
|
47
47
|
/**
|
|
48
48
|
* Creates an instance of the decoupled editor.
|
|
49
49
|
*
|
|
@@ -257,6 +257,7 @@ DecoupledEditor.EditorWatchdog = EditorWatchdog;
|
|
|
257
257
|
* Exposed as static editor field for easier access in editor builds.
|
|
258
258
|
*/
|
|
259
259
|
DecoupledEditor.ContextWatchdog = ContextWatchdog;
|
|
260
|
+
export default DecoupledEditor;
|
|
260
261
|
function getInitialData(sourceElementOrData) {
|
|
261
262
|
return isElement(sourceElementOrData) ? getDataFromElement(sourceElementOrData) : sourceElementOrData;
|
|
262
263
|
}
|
|
@@ -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-decoupled/decouplededitorui
|
|
7
7
|
*/
|
|
8
|
-
import { type Editor } from 'ckeditor5/src/core';
|
|
9
|
-
import { EditorUI } from 'ckeditor5/src/ui';
|
|
10
|
-
import type DecoupledEditorUIView from './decouplededitoruiview';
|
|
8
|
+
import { type Editor } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { EditorUI } from 'ckeditor5/src/ui.js';
|
|
10
|
+
import type DecoupledEditorUIView from './decouplededitoruiview.js';
|
|
11
11
|
/**
|
|
12
12
|
* The decoupled editor UI class.
|
|
13
13
|
*/
|
package/src/decouplededitorui.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 decoupled 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-decoupled/decouplededitoruiview
|
|
7
7
|
*/
|
|
8
|
-
import { EditorUIView, InlineEditableUIView, ToolbarView } from 'ckeditor5/src/ui';
|
|
9
|
-
import type { Locale } from 'ckeditor5/src/utils';
|
|
10
|
-
import type {
|
|
8
|
+
import { EditorUIView, InlineEditableUIView, ToolbarView } 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
|
* The decoupled editor UI view. It is a virtual view providing an inline
|
|
13
13
|
* {@link module:editor-decoupled/decouplededitoruiview~DecoupledEditorUIView#editable} and a
|
|
@@ -38,7 +38,7 @@ export default class DecoupledEditorUIView extends EditorUIView {
|
|
|
38
38
|
* in the main {@link module:editor-decoupled/decouplededitoruiview~DecoupledEditorUIView#toolbar toolbar}.
|
|
39
39
|
* See {@link module:ui/toolbar/toolbarview~ToolbarOptions#shouldGroupWhenFull} to learn more.
|
|
40
40
|
*/
|
|
41
|
-
constructor(locale: Locale, editingView:
|
|
41
|
+
constructor(locale: Locale, editingView: EditingView, options?: {
|
|
42
42
|
editableElement?: HTMLElement;
|
|
43
43
|
shouldToolbarGroupWhenFull?: boolean;
|
|
44
44
|
});
|
|
@@ -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-decoupled/decouplededitoruiview
|
|
7
7
|
*/
|
|
8
|
-
import { EditorUIView, InlineEditableUIView, ToolbarView } from 'ckeditor5/src/ui';
|
|
8
|
+
import { EditorUIView, InlineEditableUIView, ToolbarView } from 'ckeditor5/src/ui.js';
|
|
9
9
|
/**
|
|
10
10
|
* The decoupled editor UI view. It is a virtual view providing an inline
|
|
11
11
|
* {@link module:editor-decoupled/decouplededitoruiview~DecoupledEditorUIView#editable} and a
|
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-decoupled
|
|
7
7
|
*/
|
|
8
|
-
export { default as DecoupledEditor } from './decouplededitor';
|
|
8
|
+
export { default as DecoupledEditor } from './decouplededitor.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-decoupled
|
|
7
7
|
*/
|
|
8
|
-
export { default as DecoupledEditor } from './decouplededitor';
|
|
8
|
+
export { default as DecoupledEditor } from './decouplededitor.js';
|