@ckeditor/ckeditor5-editor-classic 34.2.0 → 35.1.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 ADDED
@@ -0,0 +1,206 @@
1
+ Changelog
2
+ =========
3
+
4
+ All changes in the package are documented in the main repository. See: https://github.com/ckeditor/ckeditor5/blob/master/CHANGELOG.md.
5
+
6
+ Changes for the past releases are available below.
7
+
8
+ ## [19.0.0](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v18.0.0...v19.0.0) (2020-04-29)
9
+
10
+ Internal changes only (updated dependencies, documentation, etc.).
11
+
12
+
13
+ ## [18.0.0](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v17.0.0...v18.0.0) (2020-03-19)
14
+
15
+ Internal changes only (updated dependencies, documentation, etc.).
16
+
17
+
18
+ ## [17.0.0](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v16.0.0...v17.0.0) (2020-02-19)
19
+
20
+ Internal changes only (updated dependencies, documentation, etc.).
21
+
22
+ ## [16.0.0](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v15.0.0...v16.0.0) (2019-12-04)
23
+
24
+ ### Features
25
+
26
+ * The main editor toolbar should respect the `config.toolbar.shouldNotGroupWhenFull` configuration (see [ckeditor/ckeditor5#5692](https://github.com/ckeditor/ckeditor5/issues/5692)). ([9a57e63](https://github.com/ckeditor/ckeditor5-editor-classic/commit/9a57e63))
27
+
28
+
29
+ ## [15.0.0](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v12.1.4...v15.0.0) (2019-10-23)
30
+
31
+ ### Features
32
+
33
+ * Enabled automatic items grouping in the main editor toolbar when there is not enough space to display them in a single row (see [ckeditor/ckeditor5#416](https://github.com/ckeditor/ckeditor5/issues/416)). ([4d20b70](https://github.com/ckeditor/ckeditor5-editor-classic/commit/4d20b70))
34
+
35
+
36
+ ## [12.1.4](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v12.1.3...v12.1.4) (2019-08-26)
37
+
38
+ ### Other changes
39
+
40
+ * The issue tracker for this package was moved to https://github.com/ckeditor/ckeditor5/issues. See [ckeditor/ckeditor5#1988](https://github.com/ckeditor/ckeditor5/issues/1988). ([84ec68f](https://github.com/ckeditor/ckeditor5-editor-classic/commit/84ec68f))
41
+
42
+
43
+ ## [12.1.3](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v12.1.2...v12.1.3) (2019-07-10)
44
+
45
+ Internal changes only (updated dependencies, documentation, etc.).
46
+
47
+
48
+ ## [12.1.2](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v12.1.1...v12.1.2) (2019-07-04)
49
+
50
+ Internal changes only (updated dependencies, documentation, etc.).
51
+
52
+
53
+ ## [12.1.1](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v12.1.0...v12.1.1) (2019-06-05)
54
+
55
+ Internal changes only (updated dependencies, documentation, etc.).
56
+
57
+
58
+ ## [12.1.0](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v12.0.0...v12.1.0) (2019-04-10)
59
+
60
+ ### Features
61
+
62
+ * Introduced `EditorConfig#initialData`. ([fce3edc](https://github.com/ckeditor/ckeditor5-editor-classic/commit/fce3edc))
63
+
64
+
65
+ ## [12.0.0](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v11.0.2...v12.0.0) (2019-02-28)
66
+
67
+ ### Features
68
+
69
+ * Added support for the `config.placeholder` option which allows configuring the empty editor content placeholder (see [ckeditor/ckeditor5#479](https://github.com/ckeditor/ckeditor5/issues/479)). ([3450c23](https://github.com/ckeditor/ckeditor5-editor-classic/commit/3450c23))
70
+
71
+ ### Bug fixes
72
+
73
+ * Fixed memory leaks during editor initialization and destruction (see [ckeditor/ckeditor5#1341](https://github.com/ckeditor/ckeditor5/issues/1341)). ([a3c5c82](https://github.com/ckeditor/ckeditor5-editor-classic/commit/a3c5c82))
74
+
75
+ ### Other changes
76
+
77
+ * Adjustments to new editor initialization events. See breaking changes. ([61ccab0](https://github.com/ckeditor/ckeditor5-editor-classic/commit/61ccab0))
78
+ * Editor UI classes API refactoring. See breaking changes. ([74e27ae](https://github.com/ckeditor/ckeditor5-editor-classic/commit/74e27ae))
79
+
80
+ ### BREAKING CHANGES
81
+
82
+ * Upgraded minimal versions of Node to `8.0.0` and npm to `5.7.1`. See: [ckeditor/ckeditor5#1507](https://github.com/ckeditor/ckeditor5/issues/1507). ([612ea3c](https://github.com/ckeditor/ckeditor5-cloud-services/commit/612ea3c))
83
+ * The `editor#dataReady` event was removed. The `editor.data#ready` event has been introduced and should be used instead.
84
+ * The `editor#pluginsReady` event was removed. Use plugin `afterInit()` method instead.
85
+ * Removed `ClassicEditor#element` property. The `ClassicEditorUI#element` property should be used instead.
86
+ * Removed `ClassicEditorUIView#editableElement`. Instead `ClassicEditorUI#getEditableElement()` method should be used.
87
+
88
+
89
+ ## [11.0.2](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v11.0.1...v11.0.2) (2018-12-05)
90
+
91
+ Internal changes only (updated dependencies, documentation, etc.).
92
+
93
+
94
+ ## [11.0.1](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v11.0.0...v11.0.1) (2018-10-08)
95
+
96
+ Internal changes only (updated dependencies, documentation, etc.).
97
+
98
+
99
+ ## [11.0.0](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v10.0.1...v11.0.0) (2018-07-18)
100
+
101
+ ### Features
102
+
103
+ * Editor can now be created with initial data passed to the `create()` method. Closes [#72](https://github.com/ckeditor/ckeditor5-editor-classic/issues/72). ([09cebc6](https://github.com/ckeditor/ckeditor5-editor-classic/commit/09cebc6))
104
+
105
+ ### Other changes
106
+
107
+ * Used the `EditorUI` as a parent class for the `ClassicEditorUI` (see [ckeditor/ckeditor5-core#130](https://github.com/ckeditor/ckeditor5-core/issues/130)). ([ae98cfd](https://github.com/ckeditor/ckeditor5-editor-classic/commit/ae98cfd))
108
+
109
+ ### BREAKING CHANGES
110
+
111
+ * The `ClassicEditor#element` property was renamed to `ClassicEditor#sourceElement` and `ClassicEditor#updateElement()` method to `ClassicEditor#updateSourceElement()`. See [ckeditor/ckeditor5-core#64](https://github.com/ckeditor/ckeditor5-core/issues/64).
112
+
113
+
114
+ ## [10.0.1](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v10.0.0...v10.0.1) (2018-06-21)
115
+
116
+ Internal changes only (updated dependencies, documentation, etc.).
117
+
118
+
119
+ ## [10.0.0](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v1.0.0-beta.4...v10.0.0) (2018-04-25)
120
+
121
+ ### Other changes
122
+
123
+ * Changed the license to GPL2+ only. See [ckeditor/ckeditor5#991](https://github.com/ckeditor/ckeditor5/issues/991). ([95fe4c1](https://github.com/ckeditor/ckeditor5-editor-classic/commit/95fe4c1))
124
+
125
+ ### BREAKING CHANGES
126
+
127
+ * 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.
128
+
129
+
130
+ ## [1.0.0-beta.4](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v1.0.0-beta.2...v1.0.0-beta.4) (2018-04-19)
131
+
132
+ Internal changes only (updated dependencies, documentation, etc.).
133
+
134
+
135
+ ## [1.0.0-beta.2](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v1.0.0-beta.1...v1.0.0-beta.2) (2018-04-10)
136
+
137
+ ### Other changes
138
+
139
+ * Increased the specificity of CSS rules. Introduced the `.ck` class for editor UI components (see: [ckeditor/ckeditor5#494](https://github.com/ckeditor/ckeditor5/issues/494)). ([e548bd0](https://github.com/ckeditor/ckeditor5-editor-classic/commit/e548bd0))
140
+
141
+
142
+ ## [1.0.0-beta.1](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v1.0.0-alpha.2...v1.0.0-beta.1) (2018-03-15)
143
+
144
+ ### Other changes
145
+
146
+ * Migrated the editor styles to PostCSS. Moved visual styles to `@ckeditor/ckeditor5-theme-lark` (see [ckeditor/ckeditor5-ui#144](https://github.com/ckeditor/ckeditor5-ui/issues/144)). ([f24f97d](https://github.com/ckeditor/ckeditor5-editor-classic/commit/f24f97d))
147
+ * Removed the `.ck-editor-toolbar` class from the toolbar (see [ckeditor/ckeditor5-theme-lark#135](https://github.com/ckeditor/ckeditor5-theme-lark/issues/135)). ([6b4670c](https://github.com/ckeditor/ckeditor5-editor-classic/commit/6b4670c))
148
+
149
+
150
+ ## [1.0.0-alpha.2](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2017-11-14)
151
+
152
+ ### Other changes
153
+
154
+ * Aligned UI library usage to the [changes in the UI framework](https://github.com/ckeditor/ckeditor5-ui/pull/332).
155
+
156
+
157
+ ## [1.0.0-alpha.1](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v0.8.0...v1.0.0-alpha.1) (2017-10-03)
158
+
159
+ ### Features
160
+
161
+ * The `StickyToolbarView` has been replaced by the `StickyPanelView` with a child `ToolbarView` (see [ckeditor/ckeditor5-ui#297](https://github.com/ckeditor/ckeditor5-ui/issues/297)). ([e4f591f](https://github.com/ckeditor/ckeditor5-editor-classic/commit/e4f591f))
162
+
163
+ ### BREAKING CHANGES
164
+
165
+ * The former attributes controlling the position of the toolbar provided by the `StickyToolbarView` are now available under `ClassicEditorUIView#stickyPanel` (`editor.ui.view.stickyPanel`).
166
+
167
+
168
+ ## [0.8.0](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v0.7.3...v0.8.0) (2017-09-03)
169
+
170
+ ### Bug fixes
171
+
172
+ * The toolbar should never hide underneath the edited content. Closes [#62](https://github.com/ckeditor/ckeditor5-editor-classic/issues/62). Closes ckeditor/ckeditor5-upload[#33](https://github.com/ckeditor/ckeditor5-editor-classic/issues/33). ([511d28f](https://github.com/ckeditor/ckeditor5-editor-classic/commit/511d28f))
173
+
174
+ ### Features
175
+
176
+ * The toolbar should support a vertical offset from the top of the web page. Closes [#60](https://github.com/ckeditor/ckeditor5-editor-classic/issues/60). ([6739afc](https://github.com/ckeditor/ckeditor5-editor-classic/commit/6739afc))
177
+
178
+ ### Other changes
179
+
180
+ * Renamed the `classic.js` file to `classiceditor.js` to match the naming convention. Closes [#41](https://github.com/ckeditor/ckeditor5-editor-classic/issues/41). ([c5714ba](https://github.com/ckeditor/ckeditor5-editor-classic/commit/c5714ba))
181
+
182
+ ### BREAKING CHANGES
183
+
184
+ * The `classic.js` file containing `ClassicEditor` class has been renamed to `classiceditor.js`.
185
+
186
+
187
+ ## [0.7.3](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v0.7.2...v0.7.3) (2017-05-07)
188
+
189
+ Internal changes only (updated dependencies, documentation, etc.).
190
+
191
+ ## [0.7.2](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v0.7.1...v0.7.2) (2017-04-05)
192
+
193
+ ### Bug fixes
194
+
195
+ * It should be possible to use `ClassicEditor.create()` in its child classes. Closes [#53](https://github.com/ckeditor/ckeditor5-editor-classic/issues/53). ([95798ba](https://github.com/ckeditor/ckeditor5-editor-classic/commit/95798ba))
196
+
197
+ ### Other changes
198
+
199
+ * Code refactoring to share API with `ckeditor5-editor-inline`. Closes [#48](https://github.com/ckeditor/ckeditor5-editor-classic/issues/48). ([2bb1e4e](https://github.com/ckeditor/ckeditor5-editor-classic/commit/2bb1e4e))
200
+
201
+
202
+ ## [0.7.1](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v0.7.0...v0.7.1) (2017-03-06)
203
+
204
+ ### Other changes
205
+
206
+ * Used `ToolbarView#etItemsFromConfig()` to bootstrap the toolbar in `ClassicEditorUI`. Closes [#51](https://github.com/ckeditor/ckeditor5/issues/51). ([53d58d9](https://github.com/ckeditor/ckeditor5-editor-classic/commit/53d58d9))
package/LICENSE.md CHANGED
@@ -11,6 +11,10 @@ Sources of Intellectual Property Included in CKEditor
11
11
 
12
12
  Where not otherwise indicated, all CKEditor content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, CKEditor will incorporate work done by developers outside of CKSource with their express permission.
13
13
 
14
+ The following libraries are included in CKEditor under the [MIT license](https://opensource.org/licenses/MIT):
15
+
16
+ * lodash - Copyright (c) JS Foundation and other contributors https://js.foundation/. Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors http://underscorejs.org/.
17
+
14
18
  Trademarks
15
19
  ----------
16
20
 
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md.
4
- */(()=>{var e={655:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});var o=r(609),i=r.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-modal)}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-bottom-width:0}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar{border-bottom-width:1px;border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:0}.ck.ck-editor__main>.ck-editor__editable{background:var(--ck-color-base-background);border-radius:0}.ck-rounded-corners .ck.ck-editor__main>.ck-editor__editable,.ck.ck-editor__main>.ck-editor__editable.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--ck-color-base-border)}",""]);const n=i},609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=e(t);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,o){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(o)for(var n=0;n<this.length;n++){var c=this[n][0];null!=c&&(i[c]=!0)}for(var a=0;a<e.length;a++){var s=[].concat(e[a]);o&&i[s[0]]||(r&&(s[2]?s[2]="".concat(r," and ").concat(s[2]):s[2]=r),t.push(s))}},t}},62:(e,t,r)=>{"use strict";var o,i=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},n=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),c=[];function a(e){for(var t=-1,r=0;r<c.length;r++)if(c[r].identifier===e){t=r;break}return t}function s(e,t){for(var r={},o=[],i=0;i<e.length;i++){var n=e[i],s=t.base?n[0]+t.base:n[0],l=r[s]||0,d="".concat(s," ").concat(l);r[s]=l+1;var u=a(d),b={css:n[1],media:n[2],sourceMap:n[3]};-1!==u?(c[u].references++,c[u].updater(b)):c.push({identifier:d,updater:k(b,t),references:1}),o.push(d)}return o}function l(e){var t=document.createElement("style"),o=e.attributes||{};if(void 0===o.nonce){var i=r.nc;i&&(o.nonce=i)}if(Object.keys(o).forEach((function(e){t.setAttribute(e,o[e])})),"function"==typeof e.insert)e.insert(t);else{var c=n(e.insert||"head");if(!c)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");c.appendChild(t)}return t}var d,u=(d=[],function(e,t){return d[e]=t,d.filter(Boolean).join("\n")});function b(e,t,r,o){var i=r?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(e.styleSheet)e.styleSheet.cssText=u(t,i);else{var n=document.createTextNode(i),c=e.childNodes;c[t]&&e.removeChild(c[t]),c.length?e.insertBefore(n,c[t]):e.appendChild(n)}}function f(e,t,r){var o=r.css,i=r.media,n=r.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),n&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(n))))," */")),e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}var p=null,h=0;function k(e,t){var r,o,i;if(t.singleton){var n=h++;r=p||(p=l(t)),o=b.bind(null,r,n,!1),i=b.bind(null,r,n,!0)}else r=l(t),o=f.bind(null,r,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(r)};return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=i());var r=s(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var o=0;o<r.length;o++){var i=a(r[o]);c[i].references--}for(var n=s(e,t),l=0;l<r.length;l++){var d=a(r[l]);0===c[d].references&&(c[d].updater(),c.splice(d,1))}r=n}}}},704:(e,t,r)=>{e.exports=r(79)("./src/core.js")},492:(e,t,r)=>{e.exports=r(79)("./src/engine.js")},273:(e,t,r)=>{e.exports=r(79)("./src/ui.js")},209:(e,t,r)=>{e.exports=r(79)("./src/utils.js")},79:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function r(o){var i=t[o];if(void 0!==i)return i.exports;var n=t[o]={id:o,exports:{}};return e[o](n,n.exports,r),n.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nc=void 0;var o={};(()=>{"use strict";r.r(o),r.d(o,{ClassicEditor:()=>R});var e=r(704),t=r(209);const i=function(e){return null!=e&&"object"==typeof e};const n="object"==typeof global&&global&&global.Object===Object&&global;var c="object"==typeof self&&self&&self.Object===Object&&self;const a=(n||c||Function("return this")()).Symbol;var s=Object.prototype,l=s.hasOwnProperty,d=s.toString,u=a?a.toStringTag:void 0;const b=function(e){var t=l.call(e,u),r=e[u];try{e[u]=void 0;var o=!0}catch(e){}var i=d.call(e);return o&&(t?e[u]=r:delete e[u]),i};var f=Object.prototype.toString;const p=function(e){return f.call(e)};var h=a?a.toStringTag:void 0;const k=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":h&&h in Object(e)?b(e):p(e)};const v=function(e,t){return function(r){return e(t(r))}}(Object.getPrototypeOf,Object);var m=Function.prototype,y=Object.prototype,g=m.toString,_=y.hasOwnProperty,w=g.call(Object);const j=function(e){if(!i(e)||"[object Object]"!=k(e))return!1;var t=v(e);if(null===t)return!0;var r=_.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&g.call(r)==w};const T=function(e){return i(e)&&1===e.nodeType&&!j(e)};var x=r(273),O=r(492);class E extends e.EditorUI{constructor(e,r){super(e),this.view=r,this._toolbarConfig=(0,x.normalizeToolbarConfig)(e.config.get("toolbar")),this._elementReplacer=new t.ElementReplacer}get element(){return this.view.element}init(e){const t=this.editor,r=this.view,o=t.editing.view,i=r.editable,n=o.document.getRoot();i.name=n.rootName,r.render();const c=i.element;this.setEditableElement(i.name,c),this.focusTracker.add(c),r.editable.bind("isFocused").to(this.focusTracker),o.attachDomRoot(c),e&&this._elementReplacer.replace(e,this.element),this._initPlaceholder(),this._initToolbar(),this.fire("ready")}destroy(){const e=this.view,t=this.editor.editing.view;this._elementReplacer.restore(),t.detachDomRoot(e.editable.name),e.destroy(),super.destroy()}_initToolbar(){const e=this.editor,t=this.view,r=e.editing.view;t.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),t.stickyPanel.limiterElement=t.element,t.stickyPanel.bind("viewportTopOffset").to(this,"viewportOffset",(({top:e})=>e)),t.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),(0,x.enableToolbarKeyboardFocus)({origin:r,originFocusTracker:this.focusTracker,originKeystrokeHandler:e.keystrokes,toolbar:t.toolbar})}_initPlaceholder(){const e=this.editor,t=e.editing.view,r=t.document.getRoot(),o=e.sourceElement,i=e.config.get("placeholder")||o&&"textarea"===o.tagName.toLowerCase()&&o.getAttribute("placeholder");i&&(0,O.enablePlaceholder)({view:t,element:r,text:i,isDirectHost:!1,keepOnFocus:!0})}}var S=r(62),C=r.n(S),P=r(655),F={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};C()(P.Z,F);P.Z.locals;class M extends x.BoxedEditorUIView{constructor(e,t,r={}){super(e),this.stickyPanel=new x.StickyPanelView(e),this.toolbar=new x.ToolbarView(e,{shouldGroupWhenFull:r.shouldToolbarGroupWhenFull}),this.editable=new x.InlineEditableUIView(e,t)}render(){super.render(),this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}class R extends e.Editor{constructor(r,o={}){if(!T(r)&&void 0!==o.initialData)throw new t.CKEditorError("editor-create-initial-data",null);super(o),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return T(e)?(0,t.getDataFromElement)(e):e}(r)),T(r)&&(this.sourceElement=r),this.model.document.createRoot();const i=!this.config.get("toolbar.shouldNotGroupWhenFull"),n=new M(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:i});this.ui=new E(this,n),(0,e.attachToForm)(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(e,t={}){return new Promise((r=>{const o=new this(e,t);r(o.initPlugins().then((()=>o.ui.init(T(e)?e:null))).then((()=>o.data.init(o.config.get("initialData")))).then((()=>o.fire("ready"))).then((()=>o)))}))}}(0,t.mix)(R,e.DataApiMixin),(0,t.mix)(R,e.ElementApiMixin)})(),(window.CKEditor5=window.CKEditor5||{}).editorClassic=o})();
4
+ */(()=>{var e={655:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var o=r(609),n=r.n(o)()((function(e){return e[1]}));n.push([e.id,".ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-modal)}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-bottom-width:0}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar{border-bottom-width:1px;border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:0}.ck.ck-editor__main>.ck-editor__editable{background:var(--ck-color-base-background);border-radius:0}.ck-rounded-corners .ck.ck-editor__main>.ck-editor__editable,.ck.ck-editor__main>.ck-editor__editable.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--ck-color-base-border)}",""]);const i=n},609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=e(t);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,o){"string"==typeof e&&(e=[[null,e,""]]);var n={};if(o)for(var i=0;i<this.length;i++){var c=this[i][0];null!=c&&(n[c]=!0)}for(var a=0;a<e.length;a++){var s=[].concat(e[a]);o&&n[s[0]]||(r&&(s[2]?s[2]="".concat(r," and ").concat(s[2]):s[2]=r),t.push(s))}},t}},62:(e,t,r)=>{"use strict";var o,n=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},i=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),c=[];function a(e){for(var t=-1,r=0;r<c.length;r++)if(c[r].identifier===e){t=r;break}return t}function s(e,t){for(var r={},o=[],n=0;n<e.length;n++){var i=e[n],s=t.base?i[0]+t.base:i[0],l=r[s]||0,d="".concat(s," ").concat(l);r[s]=l+1;var u=a(d),p={css:i[1],media:i[2],sourceMap:i[3]};-1!==u?(c[u].references++,c[u].updater(p)):c.push({identifier:d,updater:k(p,t),references:1}),o.push(d)}return o}function l(e){var t=document.createElement("style"),o=e.attributes||{};if(void 0===o.nonce){var n=r.nc;n&&(o.nonce=n)}if(Object.keys(o).forEach((function(e){t.setAttribute(e,o[e])})),"function"==typeof e.insert)e.insert(t);else{var c=i(e.insert||"head");if(!c)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");c.appendChild(t)}return t}var d,u=(d=[],function(e,t){return d[e]=t,d.filter(Boolean).join("\n")});function p(e,t,r,o){var n=r?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(e.styleSheet)e.styleSheet.cssText=u(t,n);else{var i=document.createTextNode(n),c=e.childNodes;c[t]&&e.removeChild(c[t]),c.length?e.insertBefore(i,c[t]):e.appendChild(i)}}function f(e,t,r){var o=r.css,n=r.media,i=r.sourceMap;if(n?e.setAttribute("media",n):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}var b=null,h=0;function k(e,t){var r,o,n;if(t.singleton){var i=h++;r=b||(b=l(t)),o=p.bind(null,r,i,!1),n=p.bind(null,r,i,!0)}else r=l(t),o=f.bind(null,r,t),n=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(r)};return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else n()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=n());var r=s(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var o=0;o<r.length;o++){var n=a(r[o]);c[n].references--}for(var i=s(e,t),l=0;l<r.length;l++){var d=a(r[l]);0===c[d].references&&(c[d].updater(),c.splice(d,1))}r=i}}}},704:(e,t,r)=>{e.exports=r(79)("./src/core.js")},492:(e,t,r)=>{e.exports=r(79)("./src/engine.js")},273:(e,t,r)=>{e.exports=r(79)("./src/ui.js")},209:(e,t,r)=>{e.exports=r(79)("./src/utils.js")},79:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={id:o,exports:{}};return e[o](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nc=void 0;var o={};(()=>{"use strict";r.r(o),r.d(o,{ClassicEditor:()=>R});var e=r(704),t=r(209);const n=function(e){return null!=e&&"object"==typeof e};const i="object"==typeof global&&global&&global.Object===Object&&global;var c="object"==typeof self&&self&&self.Object===Object&&self;const a=(i||c||Function("return this")()).Symbol;var s=Object.prototype,l=s.hasOwnProperty,d=s.toString,u=a?a.toStringTag:void 0;const p=function(e){var t=l.call(e,u),r=e[u];try{e[u]=void 0;var o=!0}catch(e){}var n=d.call(e);return o&&(t?e[u]=r:delete e[u]),n};var f=Object.prototype.toString;const b=function(e){return f.call(e)};var h=a?a.toStringTag:void 0;const k=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":h&&h in Object(e)?p(e):b(e)};const v=function(e,t){return function(r){return e(t(r))}}(Object.getPrototypeOf,Object);var m=Function.prototype,y=Object.prototype,g=m.toString,_=y.hasOwnProperty,w=g.call(Object);const j=function(e){if(!n(e)||"[object Object]"!=k(e))return!1;var t=v(e);if(null===t)return!0;var r=_.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&g.call(r)==w};const x=function(e){return n(e)&&1===e.nodeType&&!j(e)};var O=r(273),E=r(492);class T extends e.EditorUI{constructor(e,r){super(e),this.view=r,this._toolbarConfig=(0,O.normalizeToolbarConfig)(e.config.get("toolbar")),this._elementReplacer=new t.ElementReplacer}get element(){return this.view.element}init(e){const t=this.editor,r=this.view,o=t.editing.view,n=r.editable,i=o.document.getRoot();n.name=i.rootName,r.render();const c=n.element;this.setEditableElement(n.name,c),r.editable.bind("isFocused").to(this.focusTracker),o.attachDomRoot(c),e&&this._elementReplacer.replace(e,this.element),this._initPlaceholder(),this._initToolbar(),this.fire("ready")}destroy(){const e=this.view,t=this.editor.editing.view;this._elementReplacer.restore(),t.detachDomRoot(e.editable.name),e.destroy(),super.destroy()}_initToolbar(){const e=this.view;e.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),e.stickyPanel.limiterElement=e.element,e.stickyPanel.bind("viewportTopOffset").to(this,"viewportOffset",(({top:e})=>e)),e.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(e.toolbar)}_initPlaceholder(){const e=this.editor,t=e.editing.view,r=t.document.getRoot(),o=e.sourceElement,n=e.config.get("placeholder")||o&&"textarea"===o.tagName.toLowerCase()&&o.getAttribute("placeholder");n&&(0,E.enablePlaceholder)({view:t,element:r,text:n,isDirectHost:!1,keepOnFocus:!0})}}var S=r(62),C=r.n(S),P=r(655),F={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};C()(P.Z,F);P.Z.locals;class M extends O.BoxedEditorUIView{constructor(e,t,r={}){super(e),this.stickyPanel=new O.StickyPanelView(e),this.toolbar=new O.ToolbarView(e,{shouldGroupWhenFull:r.shouldToolbarGroupWhenFull}),this.editable=new O.InlineEditableUIView(e,t)}render(){super.render(),this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}class R extends e.Editor{constructor(r,o={}){if(!x(r)&&void 0!==o.initialData)throw new t.CKEditorError("editor-create-initial-data",null);super(o),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return x(e)?(0,t.getDataFromElement)(e):e}(r)),x(r)&&(this.sourceElement=r),this.model.document.createRoot();const n=!this.config.get("toolbar.shouldNotGroupWhenFull"),i=new M(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:n});this.ui=new T(this,i),(0,e.attachToForm)(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(e,t={}){return new Promise((r=>{const o=new this(e,t);r(o.initPlugins().then((()=>o.ui.init(x(e)?e:null))).then((()=>o.data.init(o.config.get("initialData")))).then((()=>o.fire("ready"))).then((()=>o)))}))}}(0,t.mix)(R,e.DataApiMixin),(0,t.mix)(R,e.ElementApiMixin)})(),(window.CKEditor5=window.CKEditor5||{}).editorClassic=o})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-editor-classic",
3
- "version": "34.2.0",
3
+ "version": "35.1.0",
4
4
  "description": "Classic editor implementation for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -11,22 +11,23 @@
11
11
  ],
12
12
  "main": "src/index.js",
13
13
  "dependencies": {
14
- "ckeditor5": "^34.2.0",
14
+ "ckeditor5": "^35.1.0",
15
15
  "lodash-es": "^4.17.15"
16
16
  },
17
17
  "devDependencies": {
18
- "@ckeditor/ckeditor5-basic-styles": "^34.2.0",
19
- "@ckeditor/ckeditor5-core": "^34.2.0",
18
+ "@ckeditor/ckeditor5-basic-styles": "^35.1.0",
19
+ "@ckeditor/ckeditor5-core": "^35.1.0",
20
20
  "@ckeditor/ckeditor5-dev-utils": "^30.0.0",
21
- "@ckeditor/ckeditor5-engine": "^34.2.0",
22
- "@ckeditor/ckeditor5-enter": "^34.2.0",
23
- "@ckeditor/ckeditor5-heading": "^34.2.0",
24
- "@ckeditor/ckeditor5-paragraph": "^34.2.0",
25
- "@ckeditor/ckeditor5-theme-lark": "^34.2.0",
26
- "@ckeditor/ckeditor5-typing": "^34.2.0",
27
- "@ckeditor/ckeditor5-ui": "^34.2.0",
28
- "@ckeditor/ckeditor5-undo": "^34.2.0",
29
- "@ckeditor/ckeditor5-utils": "^34.2.0",
21
+ "@ckeditor/ckeditor5-engine": "^35.1.0",
22
+ "@ckeditor/ckeditor5-enter": "^35.1.0",
23
+ "@ckeditor/ckeditor5-heading": "^35.1.0",
24
+ "@ckeditor/ckeditor5-image": "^35.1.0",
25
+ "@ckeditor/ckeditor5-paragraph": "^35.1.0",
26
+ "@ckeditor/ckeditor5-theme-lark": "^35.1.0",
27
+ "@ckeditor/ckeditor5-typing": "^35.1.0",
28
+ "@ckeditor/ckeditor5-ui": "^35.1.0",
29
+ "@ckeditor/ckeditor5-undo": "^35.1.0",
30
+ "@ckeditor/ckeditor5-utils": "^35.1.0",
30
31
  "webpack": "^5.58.1",
31
32
  "webpack-cli": "^4.9.0"
32
33
  },
@@ -48,7 +49,8 @@
48
49
  "src",
49
50
  "theme",
50
51
  "build",
51
- "ckeditor5-metadata.json"
52
+ "ckeditor5-metadata.json",
53
+ "CHANGELOG.md"
52
54
  ],
53
55
  "scripts": {
54
56
  "dll:build": "webpack"
@@ -16,7 +16,7 @@ import ClassicEditorUI from './classiceditorui';
16
16
  import ClassicEditorUIView from './classiceditoruiview';
17
17
 
18
18
  /**
19
- * The {@glink installation/advanced/alternative-setups/predefined-builds#classic-editor classic editor} implementation.
19
+ * The {@glink installation/getting-started/predefined-builds#classic-editor classic editor} implementation.
20
20
  * It uses an inline editable and a sticky toolbar, all enclosed in a boxed UI.
21
21
  * See the {@glink examples/builds/classic-editor demo}.
22
22
  *
@@ -27,9 +27,9 @@ import ClassicEditorUIView from './classiceditoruiview';
27
27
  *
28
28
  * The classic editor can be used directly from source (if you installed the
29
29
  * [`@ckeditor/ckeditor5-editor-classic`](https://www.npmjs.com/package/@ckeditor/ckeditor5-editor-classic) package)
30
- * but it is also available in the {@glink installation/advanced/alternative-setups/predefined-builds#classic-editor classic build}.
30
+ * but it is also available in the {@glink installation/getting-started/predefined-builds#classic-editor classic build}.
31
31
  *
32
- * {@glink installation/advanced/alternative-setups/predefined-builds Builds}
32
+ * {@glink installation/getting-started/predefined-builds Builds}
33
33
  * are ready-to-use editors with plugins bundled in. When using the editor from
34
34
  * source you need to take care of loading all plugins by yourself
35
35
  * (through the {@link module:core/editor/editorconfig~EditorConfig#plugins `config.plugins`} option).
@@ -89,7 +89,9 @@ export default class ClassicEditor extends Editor {
89
89
  /**
90
90
  * Destroys the editor instance, releasing all resources used by it.
91
91
  *
92
- * Updates the editor's source element with the data.
92
+ * Updates the original editor element with the data if the
93
+ * {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy `updateSourceElementOnDestroy`}
94
+ * configuration option is set to `true`.
93
95
  *
94
96
  * @returns {Promise}
95
97
  */
@@ -171,7 +173,7 @@ export default class ClassicEditor extends Editor {
171
173
  * # Using the editor from source
172
174
  *
173
175
  * The code samples listed in the previous sections of this documentation assume that you are using an
174
- * {@glink installation/advanced/alternative-setups/predefined-builds editor build} (for example – `@ckeditor/ckeditor5-build-classic`).
176
+ * {@glink installation/getting-started/predefined-builds editor build} (for example – `@ckeditor/ckeditor5-build-classic`).
175
177
  *
176
178
  * If you want to use the classic editor from source (`@ckeditor/ckeditor5-editor-classic/src/classiceditor`),
177
179
  * you need to define the list of
@@ -186,9 +188,10 @@ export default class ClassicEditor extends Editor {
186
188
  * and the {@link module:editor-classic/classiceditorui~ClassicEditorUI#element editor element} will replace the passed element
187
189
  * in the DOM (the original one will be hidden and the editor will be injected next to it).
188
190
  *
189
- * Moreover, the editor data will be set back to the original element once the editor is destroyed and when a form, in which
190
- * this element is contained, is submitted (if the original element is a `<textarea>`). This ensures seamless integration with native
191
- * web forms.
191
+ * If the {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy updateSourceElementOnDestroy}
192
+ * option is set to `true`, the editor data will be set back to the original element once the editor is destroyed and when a form,
193
+ * in which this element is contained, is submitted (if the original element is a `<textarea>`). This ensures seamless integration
194
+ * with native web forms.
192
195
  *
193
196
  * If the initial data is passed, a detached editor will be created. In this case you need to insert it into the DOM manually.
194
197
  * It is available under the {@link module:editor-classic/classiceditorui~ClassicEditorUI#element `editor.ui.element`} property.
@@ -8,7 +8,7 @@
8
8
  */
9
9
 
10
10
  import { EditorUI } from 'ckeditor5/src/core';
11
- import { enableToolbarKeyboardFocus, normalizeToolbarConfig } from 'ckeditor5/src/ui';
11
+ import { normalizeToolbarConfig } from 'ckeditor5/src/ui';
12
12
  import { enablePlaceholder } from 'ckeditor5/src/engine';
13
13
  import { ElementReplacer } from 'ckeditor5/src/utils';
14
14
 
@@ -85,11 +85,6 @@ export default class ClassicEditorUI extends EditorUI {
85
85
  // editable areas (roots) but the classic editor has only one.
86
86
  this.setEditableElement( editable.name, editableElement );
87
87
 
88
- // Let the global focus tracker know that the editable UI element is focusable and
89
- // belongs to the editor. From now on, the focus tracker will sustain the editor focus
90
- // as long as the editable is focused (e.g. the user is typing).
91
- this.focusTracker.add( editableElement );
92
-
93
88
  // Let the editable UI element respond to the changes in the global editor focus
94
89
  // tracker. It has been added to the same tracker a few lines above but, in reality, there are
95
90
  // many focusable areas in the editor, like balloons, toolbars or dropdowns and as long
@@ -135,9 +130,7 @@ export default class ClassicEditorUI extends EditorUI {
135
130
  * @private
136
131
  */
137
132
  _initToolbar() {
138
- const editor = this.editor;
139
133
  const view = this.view;
140
- const editingView = editor.editing.view;
141
134
 
142
135
  // Set–up the sticky panel with toolbar.
143
136
  view.stickyPanel.bind( 'isActive' ).to( this.focusTracker, 'isFocused' );
@@ -146,12 +139,8 @@ export default class ClassicEditorUI extends EditorUI {
146
139
 
147
140
  view.toolbar.fillFromConfig( this._toolbarConfig, this.componentFactory );
148
141
 
149
- enableToolbarKeyboardFocus( {
150
- origin: editingView,
151
- originFocusTracker: this.focusTracker,
152
- originKeystrokeHandler: editor.keystrokes,
153
- toolbar: view.toolbar
154
- } );
142
+ // Register the toolbar so it becomes available for Alt+F10 and Esc navigation.
143
+ this.addToolbar( view.toolbar );
155
144
  }
156
145
 
157
146
  /**