@ckeditor/ckeditor5-editor-classic 44.2.0-alpha.9 → 44.2.1-alpha.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/build/editor-classic.js +1 -1
- package/package.json +6 -6
package/build/editor-classic.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md.
|
4
|
-
*/(()=>{var t={662:(t,e,i)=>{"use strict";i.d(e,{A:()=>c});var o=i(758),n=i.n(o),r=i(935),s=i.n(r)()(n());s.push([t.id,".ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-panel)}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content{border:solid var(--ck-color-base-border);border-radius:0;border-width:1px 1px 0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content.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-sticky-panel__content.ck-sticky-panel__content_sticky{border-bottom-width:1px}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content .ck-menu-bar{border:0;border-bottom:1px solid var(--ck-color-base-border)}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content .ck-toolbar{border: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 c=s},935:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i="",o=void 0!==e[5];return e[4]&&(i+="@supports (".concat(e[4],") {")),e[2]&&(i+="@media ".concat(e[2]," {")),o&&(i+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),i+=t(e),o&&(i+="}"),e[2]&&(i+="}"),e[4]&&(i+="}"),i})).join("")},e.i=function(t,i,o,n,r){"string"==typeof t&&(t=[[null,t,void 0]]);var s={};if(o)for(var c=0;c<this.length;c++){var a=this[c][0];null!=a&&(s[a]=!0)}for(var l=0;l<t.length;l++){var d=[].concat(t[l]);o&&s[d[0]]||(void 0!==r&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=r),i&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=i):d[2]=i),n&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=n):d[4]="".concat(n)),e.push(d))}},e}},758:t=>{"use strict";t.exports=function(t){return t[1]}},591:t=>{"use strict";var e=[];function i(t){for(var i=-1,o=0;o<e.length;o++)if(e[o].identifier===t){i=o;break}return i}function o(t,o){for(var r={},s=[],c=0;c<t.length;c++){var a=t[c],l=o.base?a[0]+o.base:a[0],d=r[l]||0,u="".concat(l," ").concat(d);r[l]=d+1;var h=i(u),p={css:a[1],media:a[2],sourceMap:a[3],supports:a[4],layer:a[5]};if(-1!==h)e[h].references++,e[h].updater(p);else{var f=n(p,o);o.byIndex=c,e.splice(c,0,{identifier:u,updater:f,references:1})}s.push(u)}return s}function n(t,e){var i=e.domAPI(e);i.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;i.update(t=e)}else i.remove()}}t.exports=function(t,n){var r=o(t=t||[],n=n||{});return function(t){t=t||[];for(var s=0;s<r.length;s++){var c=i(r[s]);e[c].references--}for(var a=o(t,n),l=0;l<r.length;l++){var d=i(r[l]);0===e[d].references&&(e[d].updater(),e.splice(d,1))}r=a}}},747:t=>{"use strict";var e={};t.exports=function(t,i){var o=function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}(t);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(i)}},51:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},21:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach((function(i){t.setAttribute(i,e[i])}))}},639:t=>{"use strict";var e,i=(e=[],function(t,i){return e[t]=i,e.filter(Boolean).join("\n")});function o(t,e,o,n){var r;if(o)r="";else{r="",n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var s=void 0!==n.layer;s&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,s&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}")}if(t.styleSheet)t.styleSheet.cssText=i(e,r);else{var c=document.createTextNode(r),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(c,a[e]):t.appendChild(c)}}var n={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=n.singletonCounter++,i=n.singleton||(n.singleton=t.insertStyleElement(t));return{update:function(t){o(i,e,!1,t)},remove:function(t){o(i,e,!0,t)}}}},782:(t,e,i)=>{t.exports=i(237)("./src/core.js")},783:(t,e,i)=>{t.exports=i(237)("./src/engine.js")},311:(t,e,i)=>{t.exports=i(237)("./src/ui.js")},584:(t,e,i)=>{t.exports=i(237)("./src/utils.js")},237:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function i(o){var n=e[o];if(void 0!==n)return n.exports;var r=e[o]={id:o,exports:{}};return t[o](r,r.exports,i),r.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var o in e)i.o(e,o)&&!i.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";i.r(o),i.d(o,{ClassicEditor:()=>U,ClassicEditorUIView:()=>m});var t=i(311),e=i(783),n=i(584);class r extends t.EditorUI{constructor(e,i){super(e),this.view=i,this._toolbarConfig=(0,t.normalizeToolbarConfig)(e.config.get("toolbar")),this._elementReplacer=new n.ElementReplacer,this.listenTo(e.editing.view,"scrollToTheSelection",this._handleScrollToTheSelectionWithStickyPanel.bind(this))}get element(){return this.view.element}init(t){const e=this.editor,i=this.view,o=e.editing.view,n=i.editable,r=o.document.getRoot();n.name=r.rootName,i.render();const s=n.element;this.setEditableElement(n.name,s),i.editable.bind("isFocused").to(this.focusTracker),o.attachDomRoot(s),t&&this._elementReplacer.replace(t,this.element),this._initPlaceholder(),this._initToolbar(),i.menuBarView&&this._initMenuBar(i.menuBarView),this._initDialogPluginIntegration(),this._initContextualBalloonIntegration(),this.fire("ready")}destroy(){super.destroy();const t=this.view,e=this.editor.editing.view;this._elementReplacer.restore(),e.getDomRoot(t.editable.name)&&e.detachDomRoot(t.editable.name),t.destroy()}_initToolbar(){const t=this.view;t.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),t.stickyPanel.limiterElement=t.element,t.stickyPanel.bind("viewportTopOffset").to(this,"viewportOffset",(({top:t})=>t||0)),t.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(t.toolbar)}_initPlaceholder(){const t=this.editor,i=t.editing.view,o=i.document.getRoot(),n=t.sourceElement;let r;const s=t.config.get("placeholder");s&&(r="string"==typeof s?s:s[this.view.editable.name]),!r&&n&&"textarea"===n.tagName.toLowerCase()&&(r=n.getAttribute("placeholder")),r&&(o.placeholder=r),(0,e.enablePlaceholder)({view:i,element:o,isDirectHost:!1,keepOnFocus:!0})}_initContextualBalloonIntegration(){if(!this.editor.plugins.has("ContextualBalloon"))return;const{stickyPanel:t}=this.view,e=this.editor.plugins.get("ContextualBalloon");e.on("getPositionOptions",(e=>{const i=e.return;if(!i||!t.isSticky||!t.element)return;const o=new n.Rect(t.element).height,r="function"==typeof i.target?i.target():i.target,s="function"==typeof i.limiter?i.limiter():i.limiter;if(r&&s&&new n.Rect(r).height>=new n.Rect(s).height-o)return;const c={...i.viewportOffsetConfig},a=(c.top||0)+o;e.return={...i,viewportOffsetConfig:{...c,top:a}}}),{priority:"low"});const i=()=>{e.visibleView&&e.updatePosition()};this.listenTo(t,"change:isSticky",i),this.listenTo(this.editor.ui,"change:viewportOffset",i)}_handleScrollToTheSelectionWithStickyPanel(t,e,i){const o=this.view.stickyPanel;if(o.isSticky){const t=new n.Rect(o.element).height;e.viewportOffset.top+=t}else{const t=()=>{this.editor.editing.view.scrollToTheSelection(i)};this.listenTo(o,"change:isSticky",t),setTimeout((()=>{this.stopListening(o,"change:isSticky",t)}),20)}}_initDialogPluginIntegration(){if(!this.editor.plugins.has("Dialog"))return;const e=this.view.stickyPanel,i=this.editor.plugins.get("Dialog");i.on("show",(()=>{const o=i.view;o.on("moveTo",((i,r)=>{if(!e.isSticky||o.wasMoved||o.isModal)return;const s=new n.Rect(e.contentPanelElement);r[1]<s.bottom+t.DialogView.defaultOffset&&(r[1]=s.bottom+t.DialogView.defaultOffset)}),{priority:"high"})}),{priority:"low"})}}var s=i(591),c=i.n(s),a=i(639),l=i.n(a),d=i(747),u=i.n(d),h=i(21),p=i.n(h),f=i(51),b=i.n(f),g=i(662),v={attributes:{"data-cke":!0}};v.setAttributes=p(),v.insert=u().bind(null,"head"),v.domAPI=l(),v.insertStyleElement=b();c()(g.A,v);g.A&&g.A.locals&&g.A.locals;class m extends t.BoxedEditorUIView{constructor(e,i,o={}){super(e),this.stickyPanel=new t.StickyPanelView(e),this.toolbar=new t.ToolbarView(e,{shouldGroupWhenFull:o.shouldToolbarGroupWhenFull}),o.useMenuBar&&(this.menuBarView=new t.MenuBarView(e)),this.editable=new t.InlineEditableUIView(e,i,void 0,{label:o.label})}render(){super.render(),this.menuBarView?this.stickyPanel.content.addMany([this.menuBarView,this.toolbar]):this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}var k=i(782);const y=function(t){return null!=t&&"object"==typeof t};const w="object"==typeof global&&global&&global.Object===Object&&global;var _="object"==typeof self&&self&&self.Object===Object&&self;const T=(w||_||Function("return this")()).Symbol;var x=Object.prototype,S=x.hasOwnProperty,P=x.toString,O=T?T.toStringTag:void 0;const E=function(t){var e=S.call(t,O),i=t[O];try{t[O]=void 0;var o=!0}catch(t){}var n=P.call(t);return o&&(e?t[O]=i:delete t[O]),n};var j=Object.prototype.toString;const C=function(t){return j.call(t)};var B=T?T.toStringTag:void 0;const D=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":B&&B in Object(t)?E(t):C(t)};const M=function(t,e){return function(i){return t(e(i))}}(Object.getPrototypeOf,Object);var V=Function.prototype,F=Object.prototype,R=V.toString,I=F.hasOwnProperty,A=R.call(Object);const N=function(t){if(!y(t)||"[object Object]"!=D(t))return!1;var e=M(t);if(null===e)return!0;var i=I.call(e,"constructor")&&e.constructor;return"function"==typeof i&&i instanceof i&&R.call(i)==A};const W=function(t){return y(t)&&1===t.nodeType&&!N(t)};class U extends((0,k.ElementApiMixin)(k.Editor)){static get editorName(){return"ClassicEditor"}constructor(t,e={}){if(!G(t)&&void 0!==e.initialData)throw new n.CKEditorError("editor-create-initial-data",null);super(e),this.config.define("menuBar.isVisible",!1),void 0===this.config.get("initialData")&&this.config.set("initialData",function(t){return G(t)?(0,n.getDataFromElement)(t):t}(t)),G(t)&&(this.sourceElement=t),this.model.document.createRoot();const i=!this.config.get("toolbar.shouldNotGroupWhenFull"),o=this.config.get("menuBar"),s=new m(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:i,useMenuBar:o.isVisible,label:this.config.get("label")});this.ui=new r(this,s),(0,k.attachToForm)(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(t,e={}){return new Promise((i=>{const o=new this(t,e);i(o.initPlugins().then((()=>o.ui.init(G(t)?t:null))).then((()=>o.data.init(o.config.get("initialData")))).then((()=>o.fire("ready"))).then((()=>o)))}))}}function G(t){return W(t)}})(),(window.CKEditor5=window.CKEditor5||{}).editorClassic=o})();
|
4
|
+
*/(()=>{var t={21:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach((function(i){t.setAttribute(i,e[i])}))}},51:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},237:t=>{"use strict";t.exports=CKEditor5.dll},311:(t,e,i)=>{t.exports=i(237)("./src/ui.js")},584:(t,e,i)=>{t.exports=i(237)("./src/utils.js")},591:t=>{"use strict";var e=[];function i(t){for(var i=-1,o=0;o<e.length;o++)if(e[o].identifier===t){i=o;break}return i}function o(t,o){for(var r={},s=[],c=0;c<t.length;c++){var a=t[c],l=o.base?a[0]+o.base:a[0],d=r[l]||0,u="".concat(l," ").concat(d);r[l]=d+1;var h=i(u),p={css:a[1],media:a[2],sourceMap:a[3],supports:a[4],layer:a[5]};if(-1!==h)e[h].references++,e[h].updater(p);else{var f=n(p,o);o.byIndex=c,e.splice(c,0,{identifier:u,updater:f,references:1})}s.push(u)}return s}function n(t,e){var i=e.domAPI(e);i.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;i.update(t=e)}else i.remove()}}t.exports=function(t,n){var r=o(t=t||[],n=n||{});return function(t){t=t||[];for(var s=0;s<r.length;s++){var c=i(r[s]);e[c].references--}for(var a=o(t,n),l=0;l<r.length;l++){var d=i(r[l]);0===e[d].references&&(e[d].updater(),e.splice(d,1))}r=a}}},639:t=>{"use strict";var e,i=(e=[],function(t,i){return e[t]=i,e.filter(Boolean).join("\n")});function o(t,e,o,n){var r;if(o)r="";else{r="",n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var s=void 0!==n.layer;s&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,s&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}")}if(t.styleSheet)t.styleSheet.cssText=i(e,r);else{var c=document.createTextNode(r),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(c,a[e]):t.appendChild(c)}}var n={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=n.singletonCounter++,i=n.singleton||(n.singleton=t.insertStyleElement(t));return{update:function(t){o(i,e,!1,t)},remove:function(t){o(i,e,!0,t)}}}},662:(t,e,i)=>{"use strict";i.d(e,{A:()=>c});var o=i(758),n=i.n(o),r=i(935),s=i.n(r)()(n());s.push([t.id,".ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-panel)}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content{border:solid var(--ck-color-base-border);border-radius:0;border-width:1px 1px 0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content.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-sticky-panel__content.ck-sticky-panel__content_sticky{border-bottom-width:1px}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content .ck-menu-bar{border:0;border-bottom:1px solid var(--ck-color-base-border)}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content .ck-toolbar{border: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 c=s},747:t=>{"use strict";var e={};t.exports=function(t,i){var o=function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}(t);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(i)}},758:t=>{"use strict";t.exports=function(t){return t[1]}},782:(t,e,i)=>{t.exports=i(237)("./src/core.js")},783:(t,e,i)=>{t.exports=i(237)("./src/engine.js")},935:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i="",o=void 0!==e[5];return e[4]&&(i+="@supports (".concat(e[4],") {")),e[2]&&(i+="@media ".concat(e[2]," {")),o&&(i+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),i+=t(e),o&&(i+="}"),e[2]&&(i+="}"),e[4]&&(i+="}"),i})).join("")},e.i=function(t,i,o,n,r){"string"==typeof t&&(t=[[null,t,void 0]]);var s={};if(o)for(var c=0;c<this.length;c++){var a=this[c][0];null!=a&&(s[a]=!0)}for(var l=0;l<t.length;l++){var d=[].concat(t[l]);o&&s[d[0]]||(void 0!==r&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=r),i&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=i):d[2]=i),n&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=n):d[4]="".concat(n)),e.push(d))}},e}}},e={};function i(o){var n=e[o];if(void 0!==n)return n.exports;var r=e[o]={id:o,exports:{}};return t[o](r,r.exports,i),r.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var o in e)i.o(e,o)&&!i.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";i.r(o),i.d(o,{ClassicEditor:()=>U,ClassicEditorUIView:()=>m});var t=i(311),e=i(783),n=i(584);class r extends t.EditorUI{constructor(e,i){super(e),this.view=i,this._toolbarConfig=(0,t.normalizeToolbarConfig)(e.config.get("toolbar")),this._elementReplacer=new n.ElementReplacer,this.listenTo(e.editing.view,"scrollToTheSelection",this._handleScrollToTheSelectionWithStickyPanel.bind(this))}get element(){return this.view.element}init(t){const e=this.editor,i=this.view,o=e.editing.view,n=i.editable,r=o.document.getRoot();n.name=r.rootName,i.render();const s=n.element;this.setEditableElement(n.name,s),i.editable.bind("isFocused").to(this.focusTracker),o.attachDomRoot(s),t&&this._elementReplacer.replace(t,this.element),this._initPlaceholder(),this._initToolbar(),i.menuBarView&&this._initMenuBar(i.menuBarView),this._initDialogPluginIntegration(),this._initContextualBalloonIntegration(),this.fire("ready")}destroy(){super.destroy();const t=this.view,e=this.editor.editing.view;this._elementReplacer.restore(),e.getDomRoot(t.editable.name)&&e.detachDomRoot(t.editable.name),t.destroy()}_initToolbar(){const t=this.view;t.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),t.stickyPanel.limiterElement=t.element,t.stickyPanel.bind("viewportTopOffset").to(this,"viewportOffset",(({top:t})=>t||0)),t.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(t.toolbar)}_initPlaceholder(){const t=this.editor,i=t.editing.view,o=i.document.getRoot(),n=t.sourceElement;let r;const s=t.config.get("placeholder");s&&(r="string"==typeof s?s:s[this.view.editable.name]),!r&&n&&"textarea"===n.tagName.toLowerCase()&&(r=n.getAttribute("placeholder")),r&&(o.placeholder=r),(0,e.enablePlaceholder)({view:i,element:o,isDirectHost:!1,keepOnFocus:!0})}_initContextualBalloonIntegration(){if(!this.editor.plugins.has("ContextualBalloon"))return;const{stickyPanel:t}=this.view,e=this.editor.plugins.get("ContextualBalloon");e.on("getPositionOptions",(e=>{const i=e.return;if(!i||!t.isSticky||!t.element)return;const o=new n.Rect(t.element).height,r="function"==typeof i.target?i.target():i.target,s="function"==typeof i.limiter?i.limiter():i.limiter;if(r&&s&&new n.Rect(r).height>=new n.Rect(s).height-o)return;const c={...i.viewportOffsetConfig},a=(c.top||0)+o;e.return={...i,viewportOffsetConfig:{...c,top:a}}}),{priority:"low"});const i=()=>{e.visibleView&&e.updatePosition()};this.listenTo(t,"change:isSticky",i),this.listenTo(this.editor.ui,"change:viewportOffset",i)}_handleScrollToTheSelectionWithStickyPanel(t,e,i){const o=this.view.stickyPanel;if(o.isSticky){const t=new n.Rect(o.element).height;e.viewportOffset.top+=t}else{const t=()=>{this.editor.editing.view.scrollToTheSelection(i)};this.listenTo(o,"change:isSticky",t),setTimeout((()=>{this.stopListening(o,"change:isSticky",t)}),20)}}_initDialogPluginIntegration(){if(!this.editor.plugins.has("Dialog"))return;const e=this.view.stickyPanel,i=this.editor.plugins.get("Dialog");i.on("show",(()=>{const o=i.view;o.on("moveTo",((i,r)=>{if(!e.isSticky||o.wasMoved||o.isModal)return;const s=new n.Rect(e.contentPanelElement);r[1]<s.bottom+t.DialogView.defaultOffset&&(r[1]=s.bottom+t.DialogView.defaultOffset)}),{priority:"high"})}),{priority:"low"})}}var s=i(591),c=i.n(s),a=i(639),l=i.n(a),d=i(747),u=i.n(d),h=i(21),p=i.n(h),f=i(51),b=i.n(f),g=i(662),v={attributes:{"data-cke":!0}};v.setAttributes=p(),v.insert=u().bind(null,"head"),v.domAPI=l(),v.insertStyleElement=b();c()(g.A,v);g.A&&g.A.locals&&g.A.locals;class m extends t.BoxedEditorUIView{constructor(e,i,o={}){super(e),this.stickyPanel=new t.StickyPanelView(e),this.toolbar=new t.ToolbarView(e,{shouldGroupWhenFull:o.shouldToolbarGroupWhenFull}),o.useMenuBar&&(this.menuBarView=new t.MenuBarView(e)),this.editable=new t.InlineEditableUIView(e,i,void 0,{label:o.label})}render(){super.render(),this.menuBarView?this.stickyPanel.content.addMany([this.menuBarView,this.toolbar]):this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}var k=i(782);const y=function(t){return null!=t&&"object"==typeof t};const w="object"==typeof global&&global&&global.Object===Object&&global;var _="object"==typeof self&&self&&self.Object===Object&&self;const T=(w||_||Function("return this")()).Symbol;var x=Object.prototype,S=x.hasOwnProperty,P=x.toString,O=T?T.toStringTag:void 0;const E=function(t){var e=S.call(t,O),i=t[O];try{t[O]=void 0;var o=!0}catch(t){}var n=P.call(t);return o&&(e?t[O]=i:delete t[O]),n};var j=Object.prototype.toString;const C=function(t){return j.call(t)};var B=T?T.toStringTag:void 0;const D=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":B&&B in Object(t)?E(t):C(t)};const M=function(t,e){return function(i){return t(e(i))}}(Object.getPrototypeOf,Object);var V=Function.prototype,F=Object.prototype,R=V.toString,I=F.hasOwnProperty,A=R.call(Object);const N=function(t){if(!y(t)||"[object Object]"!=D(t))return!1;var e=M(t);if(null===e)return!0;var i=I.call(e,"constructor")&&e.constructor;return"function"==typeof i&&i instanceof i&&R.call(i)==A};const W=function(t){return y(t)&&1===t.nodeType&&!N(t)};class U extends((0,k.ElementApiMixin)(k.Editor)){static get editorName(){return"ClassicEditor"}constructor(t,e={}){if(!G(t)&&void 0!==e.initialData)throw new n.CKEditorError("editor-create-initial-data",null);super(e),this.config.define("menuBar.isVisible",!1),void 0===this.config.get("initialData")&&this.config.set("initialData",function(t){return G(t)?(0,n.getDataFromElement)(t):t}(t)),G(t)&&(this.sourceElement=t),this.model.document.createRoot();const i=!this.config.get("toolbar.shouldNotGroupWhenFull"),o=this.config.get("menuBar"),s=new m(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:i,useMenuBar:o.isVisible,label:this.config.get("label")});this.ui=new r(this,s),(0,k.attachToForm)(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(t,e={}){return new Promise((i=>{const o=new this(t,e);i(o.initPlugins().then((()=>o.ui.init(G(t)?t:null))).then((()=>o.data.init(o.config.get("initialData")))).then((()=>o.fire("ready"))).then((()=>o)))}))}}function G(t){return W(t)}})(),(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": "44.2.
|
3
|
+
"version": "44.2.1-alpha.0",
|
4
4
|
"description": "Classic editor implementation for CKEditor 5.",
|
5
5
|
"keywords": [
|
6
6
|
"ckeditor",
|
@@ -12,11 +12,11 @@
|
|
12
12
|
"type": "module",
|
13
13
|
"main": "src/index.js",
|
14
14
|
"dependencies": {
|
15
|
-
"@ckeditor/ckeditor5-core": "44.2.
|
16
|
-
"@ckeditor/ckeditor5-engine": "44.2.
|
17
|
-
"@ckeditor/ckeditor5-ui": "44.2.
|
18
|
-
"@ckeditor/ckeditor5-utils": "44.2.
|
19
|
-
"ckeditor5": "44.2.
|
15
|
+
"@ckeditor/ckeditor5-core": "44.2.1-alpha.0",
|
16
|
+
"@ckeditor/ckeditor5-engine": "44.2.1-alpha.0",
|
17
|
+
"@ckeditor/ckeditor5-ui": "44.2.1-alpha.0",
|
18
|
+
"@ckeditor/ckeditor5-utils": "44.2.1-alpha.0",
|
19
|
+
"ckeditor5": "44.2.1-alpha.0",
|
20
20
|
"lodash-es": "4.17.21"
|
21
21
|
},
|
22
22
|
"author": "CKSource (http://cksource.com/)",
|