@ckeditor/ckeditor5-editor-classic 35.0.1 → 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 +1 -1
- package/build/editor-classic.js +1 -1
- package/package.json +14 -13
- package/src/classiceditorui.js +3 -14
package/CHANGELOG.md
CHANGED
@@ -162,7 +162,7 @@ Internal changes only (updated dependencies, documentation, etc.).
|
|
162
162
|
|
163
163
|
### BREAKING CHANGES
|
164
164
|
|
165
|
-
* The former attributes
|
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
166
|
|
167
167
|
|
168
168
|
## [0.8.0](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v0.7.3...v0.8.0) (2017-09-03)
|
package/build/editor-classic.js
CHANGED
@@ -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:()=>
|
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": "35.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": "^35.0
|
14
|
+
"ckeditor5": "^35.1.0",
|
15
15
|
"lodash-es": "^4.17.15"
|
16
16
|
},
|
17
17
|
"devDependencies": {
|
18
|
-
"@ckeditor/ckeditor5-basic-styles": "^35.0
|
19
|
-
"@ckeditor/ckeditor5-core": "^35.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": "^35.0
|
22
|
-
"@ckeditor/ckeditor5-enter": "^35.0
|
23
|
-
"@ckeditor/ckeditor5-heading": "^35.0
|
24
|
-
"@ckeditor/ckeditor5-
|
25
|
-
"@ckeditor/ckeditor5-
|
26
|
-
"@ckeditor/ckeditor5-
|
27
|
-
"@ckeditor/ckeditor5-
|
28
|
-
"@ckeditor/ckeditor5-
|
29
|
-
"@ckeditor/ckeditor5-
|
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
|
},
|
package/src/classiceditorui.js
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
*/
|
9
9
|
|
10
10
|
import { EditorUI } from 'ckeditor5/src/core';
|
11
|
-
import {
|
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
|
-
|
150
|
-
|
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
|
/**
|