@ckeditor/ckeditor5-editor-classic 41.3.1 → 41.4.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.
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md.
4
- */(()=>{var e={662:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var i=o(935),n=o.n(i)()((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-panel)}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content{border-radius: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{border:solid var(--ck-color-base-border);border-width:1px 1px 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,.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 r=n},935:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o=e(t);return t[2]?"@media ".concat(t[2]," {").concat(o,"}"):o})).join("")},t.i=function(e,o,i){"string"==typeof e&&(e=[[null,e,""]]);var n={};if(i)for(var r=0;r<this.length;r++){var c=this[r][0];null!=c&&(n[c]=!0)}for(var s=0;s<e.length;s++){var a=[].concat(e[s]);i&&n[a[0]]||(o&&(a[2]?a[2]="".concat(o," and ").concat(a[2]):a[2]=o),t.push(a))}},t}},591:(e,t,o)=>{"use strict";var i,n=function(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},r=function(){var e={};return function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}e[t]=o}return e[t]}}(),c=[];function s(e){for(var t=-1,o=0;o<c.length;o++)if(c[o].identifier===e){t=o;break}return t}function a(e,t){for(var o={},i=[],n=0;n<e.length;n++){var r=e[n],a=t.base?r[0]+t.base:r[0],l=o[a]||0,d="".concat(a," ").concat(l);o[a]=l+1;var u=s(d),h={css:r[1],media:r[2],sourceMap:r[3]};-1!==u?(c[u].references++,c[u].updater(h)):c.push({identifier:d,updater:k(h,t),references:1}),i.push(d)}return i}function l(e){var t=document.createElement("style"),i=e.attributes||{};if(void 0===i.nonce){var n=o.nc;n&&(i.nonce=n)}if(Object.keys(i).forEach((function(e){t.setAttribute(e,i[e])})),"function"==typeof e.insert)e.insert(t);else{var c=r(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 h(e,t,o,i){var n=o?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(e.styleSheet)e.styleSheet.cssText=u(t,n);else{var r=document.createTextNode(n),c=e.childNodes;c[t]&&e.removeChild(c[t]),c.length?e.insertBefore(r,c[t]):e.appendChild(r)}}function f(e,t,o){var i=o.css,n=o.media,r=o.sourceMap;if(n?e.setAttribute("media",n):e.removeAttribute("media"),r&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}var p=null,b=0;function k(e,t){var o,i,n;if(t.singleton){var r=b++;o=p||(p=l(t)),i=h.bind(null,o,r,!1),n=h.bind(null,o,r,!0)}else o=l(t),i=f.bind(null,o,t),n=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(o)};return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else n()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=n());var o=a(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var i=0;i<o.length;i++){var n=s(o[i]);c[n].references--}for(var r=a(e,t),l=0;l<o.length;l++){var d=s(o[l]);0===c[d].references&&(c[d].updater(),c.splice(d,1))}o=r}}}},782:(e,t,o)=>{e.exports=o(237)("./src/core.js")},783:(e,t,o)=>{e.exports=o(237)("./src/engine.js")},311:(e,t,o)=>{e.exports=o(237)("./src/ui.js")},584:(e,t,o)=>{e.exports=o(237)("./src/utils.js")},602:(e,t,o)=>{e.exports=o(237)("./src/watchdog.js")},237:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function o(i){var n=t[i];if(void 0!==n)return n.exports;var r=t[i]={id:i,exports:{}};return e[i](r,r.exports,o),r.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var i={};(()=>{"use strict";o.r(i),o.d(i,{ClassicEditor:()=>D});var e=o(311),t=o(783),n=o(584);class r extends e.EditorUI{constructor(t,o){super(t),this.view=o,this._toolbarConfig=(0,e.normalizeToolbarConfig)(t.config.get("toolbar")),this._menuBarConfig=(0,e.normalizeMenuBarConfig)(t.config.get("menuBar")||{}),this._elementReplacer=new n.ElementReplacer,this.listenTo(t.editing.view,"scrollToTheSelection",this._handleScrollToTheSelectionWithStickyPanel.bind(this))}get element(){return this.view.element}init(e){const t=this.editor,o=this.view,i=t.editing.view,n=o.editable,r=i.document.getRoot();n.name=r.rootName,o.render();const c=n.element;this.setEditableElement(n.name,c),o.editable.bind("isFocused").to(this.focusTracker),i.attachDomRoot(c),e&&this._elementReplacer.replace(e,this.element),this._initPlaceholder(),this._initToolbar(),this._initMenuBar(),this._initDialogPluginIntegration(),this.fire("ready")}destroy(){super.destroy();const e=this.view,t=this.editor.editing.view;this._elementReplacer.restore(),t.detachDomRoot(e.editable.name),e.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||0)),e.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(e.toolbar)}_initMenuBar(){const e=this.view;e.menuBarView&&(this._setupMenuBarBehaviors(e.menuBarView.element),e.menuBarView.fillFromConfig(this._menuBarConfig,this.componentFactory))}_initPlaceholder(){const e=this.editor,o=e.editing.view,i=o.document.getRoot(),n=e.sourceElement;let r;const c=e.config.get("placeholder");c&&(r="string"==typeof c?c:c[this.view.editable.name]),!r&&n&&"textarea"===n.tagName.toLowerCase()&&(r=n.getAttribute("placeholder")),r&&(i.placeholder=r),(0,t.enablePlaceholder)({view:o,element:i,isDirectHost:!1,keepOnFocus:!0})}_handleScrollToTheSelectionWithStickyPanel(e,t,o){const i=this.view.stickyPanel;if(i.isSticky){const e=new n.Rect(i.element).height;t.viewportOffset.top+=e}else{const e=()=>{this.editor.editing.view.scrollToTheSelection(o)};this.listenTo(i,"change:isSticky",e),setTimeout((()=>{this.stopListening(i,"change:isSticky",e)}),20)}}_initDialogPluginIntegration(){if(!this.editor.plugins.has("Dialog"))return;const t=this.view.stickyPanel,o=this.editor.plugins.get("Dialog");o.on("show",(()=>{const i=o.view;i.on("moveTo",((o,r)=>{if(!t.isSticky||i.wasMoved)return;const c=new n.Rect(t.contentPanelElement);r[1]<c.bottom+e.DialogView.defaultOffset&&(r[1]=c.bottom+e.DialogView.defaultOffset)}),{priority:"high"})}),{priority:"low"})}_setupMenuBarBehaviors(e){const t=this.editor;this.focusTracker.add(e),t.keystrokes.listenTo(e),t.keystrokes.set("Esc",((o,i)=>{e.contains(this.focusTracker.focusedElement)&&(t.editing.view.focus(),i())})),t.keystrokes.set("Alt+F9",((t,o)=>{e.contains(this.focusTracker.focusedElement)||(this.view.menuBarView.focus(),o())}))}}var c=o(591),s=o.n(c),a=o(662),l={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};s()(a.A,l);a.A.locals;class d extends e.BoxedEditorUIView{constructor(t,o,i={}){super(t),this.stickyPanel=new e.StickyPanelView(t),this.toolbar=new e.ToolbarView(t,{shouldGroupWhenFull:i.shouldToolbarGroupWhenFull}),i.useMenuBar&&(this.menuBarView=new e.MenuBarView(t)),this.editable=new e.InlineEditableUIView(t,o)}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 u=o(782),h=o(602);const f=function(e){return null!=e&&"object"==typeof e};const p="object"==typeof global&&global&&global.Object===Object&&global;var b="object"==typeof self&&self&&self.Object===Object&&self;const k=(p||b||Function("return this")()).Symbol;var m=Object.prototype,g=m.hasOwnProperty,v=m.toString,y=k?k.toStringTag:void 0;const w=function(e){var t=g.call(e,y),o=e[y];try{e[y]=void 0;var i=!0}catch(e){}var n=v.call(e);return i&&(t?e[y]=o:delete e[y]),n};var _=Object.prototype.toString;const T=function(e){return _.call(e)};var j=k?k.toStringTag:void 0;const S=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":j&&j in Object(e)?w(e):T(e)};const E=function(e,t){return function(o){return e(t(o))}}(Object.getPrototypeOf,Object);var x=Function.prototype,C=Object.prototype,O=x.toString,P=C.hasOwnProperty,B=O.call(Object);const M=function(e){if(!f(e)||"[object Object]"!=S(e))return!1;var t=E(e);if(null===t)return!0;var o=P.call(t,"constructor")&&t.constructor;return"function"==typeof o&&o instanceof o&&O.call(o)==B};const F=function(e){return f(e)&&1===e.nodeType&&!M(e)};class V extends((0,u.ElementApiMixin)(u.Editor)){constructor(e,t={}){if(!R(e)&&void 0!==t.initialData)throw new n.CKEditorError("editor-create-initial-data",null);super(t),this.config.define("menuBar.isVisible",!1),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return R(e)?(0,n.getDataFromElement)(e):e}(e)),R(e)&&(this.sourceElement=e),this.model.document.createRoot();const o=!this.config.get("toolbar.shouldNotGroupWhenFull"),i=this.config.get("menuBar"),c=new d(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:o,useMenuBar:i.isVisible});this.ui=new r(this,c),(0,u.attachToForm)(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(e,t={}){return new Promise((o=>{const i=new this(e,t);o(i.initPlugins().then((()=>i.ui.init(R(e)?e:null))).then((()=>i.data.init(i.config.get("initialData")))).then((()=>i.fire("ready"))).then((()=>i)))}))}}V.Context=u.Context,V.EditorWatchdog=h.EditorWatchdog,V.ContextWatchdog=h.ContextWatchdog;const D=V;function R(e){return F(e)}})(),(window.CKEditor5=window.CKEditor5||{}).editorClassic=i})();
4
+ */(()=>{var e={662:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var i=o(935),n=o.n(i)()((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-panel)}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content{border-radius: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{border:solid var(--ck-color-base-border);border-width:1px 1px 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,.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 r=n},935:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o=e(t);return t[2]?"@media ".concat(t[2]," {").concat(o,"}"):o})).join("")},t.i=function(e,o,i){"string"==typeof e&&(e=[[null,e,""]]);var n={};if(i)for(var r=0;r<this.length;r++){var c=this[r][0];null!=c&&(n[c]=!0)}for(var a=0;a<e.length;a++){var s=[].concat(e[a]);i&&n[s[0]]||(o&&(s[2]?s[2]="".concat(o," and ").concat(s[2]):s[2]=o),t.push(s))}},t}},591:(e,t,o)=>{"use strict";var i,n=function(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},r=function(){var e={};return function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}e[t]=o}return e[t]}}(),c=[];function a(e){for(var t=-1,o=0;o<c.length;o++)if(c[o].identifier===e){t=o;break}return t}function s(e,t){for(var o={},i=[],n=0;n<e.length;n++){var r=e[n],s=t.base?r[0]+t.base:r[0],l=o[s]||0,d="".concat(s," ").concat(l);o[s]=l+1;var u=a(d),h={css:r[1],media:r[2],sourceMap:r[3]};-1!==u?(c[u].references++,c[u].updater(h)):c.push({identifier:d,updater:k(h,t),references:1}),i.push(d)}return i}function l(e){var t=document.createElement("style"),i=e.attributes||{};if(void 0===i.nonce){var n=o.nc;n&&(i.nonce=n)}if(Object.keys(i).forEach((function(e){t.setAttribute(e,i[e])})),"function"==typeof e.insert)e.insert(t);else{var c=r(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 h(e,t,o,i){var n=o?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(e.styleSheet)e.styleSheet.cssText=u(t,n);else{var r=document.createTextNode(n),c=e.childNodes;c[t]&&e.removeChild(c[t]),c.length?e.insertBefore(r,c[t]):e.appendChild(r)}}function p(e,t,o){var i=o.css,n=o.media,r=o.sourceMap;if(n?e.setAttribute("media",n):e.removeAttribute("media"),r&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}var f=null,b=0;function k(e,t){var o,i,n;if(t.singleton){var r=b++;o=f||(f=l(t)),i=h.bind(null,o,r,!1),n=h.bind(null,o,r,!0)}else o=l(t),i=p.bind(null,o,t),n=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(o)};return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else n()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=n());var o=s(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var i=0;i<o.length;i++){var n=a(o[i]);c[n].references--}for(var r=s(e,t),l=0;l<o.length;l++){var d=a(o[l]);0===c[d].references&&(c[d].updater(),c.splice(d,1))}o=r}}}},782:(e,t,o)=>{e.exports=o(237)("./src/core.js")},783:(e,t,o)=>{e.exports=o(237)("./src/engine.js")},311:(e,t,o)=>{e.exports=o(237)("./src/ui.js")},584:(e,t,o)=>{e.exports=o(237)("./src/utils.js")},602:(e,t,o)=>{e.exports=o(237)("./src/watchdog.js")},237:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function o(i){var n=t[i];if(void 0!==n)return n.exports;var r=t[i]={id:i,exports:{}};return e[i](r,r.exports,o),r.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var i={};(()=>{"use strict";o.r(i),o.d(i,{ClassicEditor:()=>V});var e=o(311),t=o(783),n=o(584);class r extends e.EditorUI{constructor(t,o){super(t),this.view=o,this._toolbarConfig=(0,e.normalizeToolbarConfig)(t.config.get("toolbar")),this._elementReplacer=new n.ElementReplacer,this.listenTo(t.editing.view,"scrollToTheSelection",this._handleScrollToTheSelectionWithStickyPanel.bind(this))}get element(){return this.view.element}init(t){const o=this.editor,i=this.view,n=o.editing.view,r=i.editable,c=n.document.getRoot();r.name=c.rootName,i.render();const a=r.element;this.setEditableElement(r.name,a),i.editable.bind("isFocused").to(this.focusTracker),n.attachDomRoot(a),t&&this._elementReplacer.replace(t,this.element),this._initPlaceholder(),this._initToolbar(),i.menuBarView&&(0,e._initMenuBar)(o,i.menuBarView),this._initDialogPluginIntegration(),this.fire("ready")}destroy(){super.destroy();const e=this.view,t=this.editor.editing.view;this._elementReplacer.restore(),t.detachDomRoot(e.editable.name),e.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||0)),e.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(e.toolbar)}_initPlaceholder(){const e=this.editor,o=e.editing.view,i=o.document.getRoot(),n=e.sourceElement;let r;const c=e.config.get("placeholder");c&&(r="string"==typeof c?c:c[this.view.editable.name]),!r&&n&&"textarea"===n.tagName.toLowerCase()&&(r=n.getAttribute("placeholder")),r&&(i.placeholder=r),(0,t.enablePlaceholder)({view:o,element:i,isDirectHost:!1,keepOnFocus:!0})}_handleScrollToTheSelectionWithStickyPanel(e,t,o){const i=this.view.stickyPanel;if(i.isSticky){const e=new n.Rect(i.element).height;t.viewportOffset.top+=e}else{const e=()=>{this.editor.editing.view.scrollToTheSelection(o)};this.listenTo(i,"change:isSticky",e),setTimeout((()=>{this.stopListening(i,"change:isSticky",e)}),20)}}_initDialogPluginIntegration(){if(!this.editor.plugins.has("Dialog"))return;const t=this.view.stickyPanel,o=this.editor.plugins.get("Dialog");o.on("show",(()=>{const i=o.view;i.on("moveTo",((o,r)=>{if(!t.isSticky||i.wasMoved)return;const c=new n.Rect(t.contentPanelElement);r[1]<c.bottom+e.DialogView.defaultOffset&&(r[1]=c.bottom+e.DialogView.defaultOffset)}),{priority:"high"})}),{priority:"low"})}}var c=o(591),a=o.n(c),s=o(662),l={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};a()(s.A,l);s.A.locals;class d extends e.BoxedEditorUIView{constructor(t,o,i={}){super(t),this.stickyPanel=new e.StickyPanelView(t),this.toolbar=new e.ToolbarView(t,{shouldGroupWhenFull:i.shouldToolbarGroupWhenFull}),i.useMenuBar&&(this.menuBarView=new e.MenuBarView(t)),this.editable=new e.InlineEditableUIView(t,o)}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 u=o(782),h=o(602);const p=function(e){return null!=e&&"object"==typeof e};const f="object"==typeof global&&global&&global.Object===Object&&global;var b="object"==typeof self&&self&&self.Object===Object&&self;const k=(f||b||Function("return this")()).Symbol;var g=Object.prototype,v=g.hasOwnProperty,m=g.toString,y=k?k.toStringTag:void 0;const w=function(e){var t=v.call(e,y),o=e[y];try{e[y]=void 0;var i=!0}catch(e){}var n=m.call(e);return i&&(t?e[y]=o:delete e[y]),n};var _=Object.prototype.toString;const T=function(e){return _.call(e)};var j=k?k.toStringTag:void 0;const S=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":j&&j in Object(e)?w(e):T(e)};const x=function(e,t){return function(o){return e(t(o))}}(Object.getPrototypeOf,Object);var O=Function.prototype,E=Object.prototype,P=O.toString,C=E.hasOwnProperty,M=P.call(Object);const B=function(e){if(!p(e)||"[object Object]"!=S(e))return!1;var t=x(e);if(null===t)return!0;var o=C.call(t,"constructor")&&t.constructor;return"function"==typeof o&&o instanceof o&&P.call(o)==M};const D=function(e){return p(e)&&1===e.nodeType&&!B(e)};class F extends((0,u.ElementApiMixin)(u.Editor)){constructor(e,t={}){if(!R(e)&&void 0!==t.initialData)throw new n.CKEditorError("editor-create-initial-data",null);super(t),this.config.define("menuBar.isVisible",!1),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return R(e)?(0,n.getDataFromElement)(e):e}(e)),R(e)&&(this.sourceElement=e),this.model.document.createRoot();const o=!this.config.get("toolbar.shouldNotGroupWhenFull"),i=this.config.get("menuBar"),c=new d(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:o,useMenuBar:i.isVisible});this.ui=new r(this,c),(0,u.attachToForm)(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(e,t={}){return new Promise((o=>{const i=new this(e,t);o(i.initPlugins().then((()=>i.ui.init(R(e)?e:null))).then((()=>i.data.init(i.config.get("initialData")))).then((()=>i.fire("ready"))).then((()=>i)))}))}}F.Context=u.Context,F.EditorWatchdog=h.EditorWatchdog,F.ContextWatchdog=h.ContextWatchdog;const V=F;function R(e){return D(e)}})(),(window.CKEditor5=window.CKEditor5||{}).editorClassic=i})();
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ .ck.ck-editor {
6
+ position: relative;
7
+ }
8
+ .ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar {
9
+ z-index: var(--ck-z-panel);
10
+ }
package/dist/index.css ADDED
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /*
6
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+
10
+ .ck.ck-editor {
11
+ /* All the elements within `.ck-editor` are positioned relatively to it.
12
+ If any element needs to be positioned with respect to the <body>, etc.,
13
+ it must land outside of the `.ck-editor` in DOM. */
14
+ position: relative;
15
+ }
16
+
17
+ .ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar {
18
+ /* https://github.com/ckeditor/ckeditor5-editor-classic/issues/62 */
19
+ z-index: var(--ck-z-panel);
20
+ }
21
+
22
+ /*# sourceMappingURL=index.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../theme/classiceditor.css","index.css"],"names":[],"mappings":";;;;AAAA,CAAA,CAAA;ACCA,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC;AAC5E,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO;AACnF,CAAC,CDAC,CAAA;ACCF;ADCA,CAAA,EAAA,CAAA,EAAA,CAAA,MAAA,CAAA,CAAA;ACCA,CDAC,CAAA,CAAA,CAAA,GAAA,CAAA,GAAA,CAAA,QAAA,CAAA,MAAA,CAAA,CAAA,CAAA,EAAA,CAAA,MAAA,CAAA,CAAA,GAAA,CAAA,UAAA,CAAA,UAAA,CAAA,EAAA,CAAA,EAAA,CAAA;ACCD,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AACzE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CDAC,CAAA;ACCpD,CDAC,QAAA,CAAA,CAAA,QAAkB,CAAA;AAMnB,CAAA;ACJA;ADAC,CAAA,EAAA,CAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,CAAA,WAAA,CAAA,CAAA,EAAA,CAAA,MAAA,CAAA,KAAA,CAAA,CAAA,EAAA,CAAA,OAAA,CAAA,CAAA;ACED,CAAC,CDDC,CAAA,CAAA,CAAA,KAAA,CAAA,CAAA,CAAA,MAAA,CAAA,GAAA,CAAA,QAAA,CAAA,SAAA,CAAA,MAAA,CAAA,OAAA,CAAA,MAAA,CAAA,EAAA,CAAA,CAAmE,CAAA;ACErE,CAAC,CDDC,CAAA,CAAA,KAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,KAAA,CAA0B,CAAA;ACE5B,CDDC,CAAA;ACED;AACA,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC","file":"index.css.map","sourcesContent":["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor {\n\t/* All the elements within `.ck-editor` are positioned relatively to it.\n\t If any element needs to be positioned with respect to the <body>, etc.,\n\t it must land outside of the `.ck-editor` in DOM. */\n\tposition: relative;\n\n\t& .ck-editor__top .ck-sticky-panel .ck-toolbar {\n\t\t/* https://github.com/ckeditor/ckeditor5-editor-classic/issues/62 */\n\t\tz-index: var(--ck-z-panel);\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor {\n\t/* All the elements within `.ck-editor` are positioned relatively to it.\n\t If any element needs to be positioned with respect to the <body>, etc.,\n\t it must land outside of the `.ck-editor` in DOM. */\n\tposition: relative;\n}\n\n.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar {\n\t\t/* https://github.com/ckeditor/ckeditor5-editor-classic/issues/62 */\n\t\tz-index: var(--ck-z-panel);\n\t}\n\n/*# sourceMappingURL=index.css.map */"]}
package/dist/index.js ADDED
@@ -0,0 +1,419 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ import { EditorUI, _initMenuBar, DialogView, normalizeToolbarConfig, BoxedEditorUIView, StickyPanelView, ToolbarView, MenuBarView, InlineEditableUIView } from '@ckeditor/ckeditor5-ui/dist/index.js';
6
+ import { enablePlaceholder } from '@ckeditor/ckeditor5-engine/dist/index.js';
7
+ import { Rect, ElementReplacer, CKEditorError, getDataFromElement } from '@ckeditor/ckeditor5-utils/dist/index.js';
8
+ import { ElementApiMixin, Editor, attachToForm, Context } from '@ckeditor/ckeditor5-core/dist/index.js';
9
+ import { EditorWatchdog, ContextWatchdog } from '@ckeditor/ckeditor5-watchdog/dist/index.js';
10
+ import { isElement as isElement$1 } from 'lodash-es';
11
+
12
+ class ClassicEditorUI extends EditorUI {
13
+ /**
14
+ * @inheritDoc
15
+ */ get element() {
16
+ return this.view.element;
17
+ }
18
+ /**
19
+ * Initializes the UI.
20
+ *
21
+ * @param replacementElement The DOM element that will be the source for the created editor.
22
+ */ init(replacementElement) {
23
+ const editor = this.editor;
24
+ const view = this.view;
25
+ const editingView = editor.editing.view;
26
+ const editable = view.editable;
27
+ const editingRoot = editingView.document.getRoot();
28
+ // The editable UI and editing root should share the same name. Then name is used
29
+ // to recognize the particular editable, for instance in ARIA attributes.
30
+ editable.name = editingRoot.rootName;
31
+ view.render();
32
+ // The editable UI element in DOM is available for sure only after the editor UI view has been rendered.
33
+ // But it can be available earlier if a DOM element has been passed to BalloonEditor.create().
34
+ const editableElement = editable.element;
35
+ // Register the editable UI view in the editor. A single editor instance can aggregate multiple
36
+ // editable areas (roots) but the classic editor has only one.
37
+ this.setEditableElement(editable.name, editableElement);
38
+ // Let the editable UI element respond to the changes in the global editor focus
39
+ // tracker. It has been added to the same tracker a few lines above but, in reality, there are
40
+ // many focusable areas in the editor, like balloons, toolbars or dropdowns and as long
41
+ // as they have focus, the editable should act like it is focused too (although technically
42
+ // it isn't), e.g. by setting the proper CSS class, visually announcing focus to the user.
43
+ // Doing otherwise will result in editable focus styles disappearing, once e.g. the
44
+ // toolbar gets focused.
45
+ view.editable.bind('isFocused').to(this.focusTracker);
46
+ // Bind the editable UI element to the editing view, making it an end– and entry–point
47
+ // of the editor's engine. This is where the engine meets the UI.
48
+ editingView.attachDomRoot(editableElement);
49
+ // If an element containing the initial data of the editor was provided, replace it with
50
+ // an editor instance's UI in DOM until the editor is destroyed. For instance, a <textarea>
51
+ // can be such element.
52
+ if (replacementElement) {
53
+ this._elementReplacer.replace(replacementElement, this.element);
54
+ }
55
+ this._initPlaceholder();
56
+ this._initToolbar();
57
+ if (view.menuBarView) {
58
+ _initMenuBar(editor, view.menuBarView);
59
+ }
60
+ this._initDialogPluginIntegration();
61
+ this.fire('ready');
62
+ }
63
+ /**
64
+ * @inheritDoc
65
+ */ destroy() {
66
+ super.destroy();
67
+ const view = this.view;
68
+ const editingView = this.editor.editing.view;
69
+ this._elementReplacer.restore();
70
+ editingView.detachDomRoot(view.editable.name);
71
+ view.destroy();
72
+ }
73
+ /**
74
+ * Initializes the editor toolbar.
75
+ */ _initToolbar() {
76
+ const view = this.view;
77
+ // Set–up the sticky panel with toolbar.
78
+ view.stickyPanel.bind('isActive').to(this.focusTracker, 'isFocused');
79
+ view.stickyPanel.limiterElement = view.element;
80
+ view.stickyPanel.bind('viewportTopOffset').to(this, 'viewportOffset', ({ top })=>top || 0);
81
+ view.toolbar.fillFromConfig(this._toolbarConfig, this.componentFactory);
82
+ // Register the toolbar so it becomes available for Alt+F10 and Esc navigation.
83
+ this.addToolbar(view.toolbar);
84
+ }
85
+ /**
86
+ * Enable the placeholder text on the editing root.
87
+ */ _initPlaceholder() {
88
+ const editor = this.editor;
89
+ const editingView = editor.editing.view;
90
+ const editingRoot = editingView.document.getRoot();
91
+ const sourceElement = editor.sourceElement;
92
+ let placeholderText;
93
+ const placeholder = editor.config.get('placeholder');
94
+ if (placeholder) {
95
+ placeholderText = typeof placeholder === 'string' ? placeholder : placeholder[this.view.editable.name];
96
+ }
97
+ if (!placeholderText && sourceElement && sourceElement.tagName.toLowerCase() === 'textarea') {
98
+ placeholderText = sourceElement.getAttribute('placeholder');
99
+ }
100
+ if (placeholderText) {
101
+ editingRoot.placeholder = placeholderText;
102
+ }
103
+ enablePlaceholder({
104
+ view: editingView,
105
+ element: editingRoot,
106
+ isDirectHost: false,
107
+ keepOnFocus: true
108
+ });
109
+ }
110
+ /**
111
+ * Provides an integration between the sticky toolbar and {@link module:utils/dom/scroll~scrollViewportToShowTarget}.
112
+ * It allows the UI-agnostic engine method to consider the geometry of the
113
+ * {@link module:editor-classic/classiceditoruiview~ClassicEditorUIView#stickyPanel} that pins to the
114
+ * edge of the viewport and can obscure the user caret after scrolling the window.
115
+ *
116
+ * @param evt The `scrollToTheSelection` event info.
117
+ * @param data The payload carried by the `scrollToTheSelection` event.
118
+ * @param originalArgs The original arguments passed to `scrollViewportToShowTarget()` method (see implementation to learn more).
119
+ */ _handleScrollToTheSelectionWithStickyPanel(evt, data, originalArgs) {
120
+ const stickyPanel = this.view.stickyPanel;
121
+ if (stickyPanel.isSticky) {
122
+ const stickyPanelHeight = new Rect(stickyPanel.element).height;
123
+ data.viewportOffset.top += stickyPanelHeight;
124
+ } else {
125
+ const scrollViewportOnPanelGettingSticky = ()=>{
126
+ this.editor.editing.view.scrollToTheSelection(originalArgs);
127
+ };
128
+ this.listenTo(stickyPanel, 'change:isSticky', scrollViewportOnPanelGettingSticky);
129
+ // This works as a post-scroll-fixer because it's impossible predict whether the panel will be sticky after scrolling or not.
130
+ // Listen for a short period of time only and if the toolbar does not become sticky very soon, cancel the listener.
131
+ setTimeout(()=>{
132
+ this.stopListening(stickyPanel, 'change:isSticky', scrollViewportOnPanelGettingSticky);
133
+ }, 20);
134
+ }
135
+ }
136
+ /**
137
+ * Provides an integration between the sticky toolbar and {@link module:ui/dialog/dialog the Dialog plugin}.
138
+ *
139
+ * It moves the dialog down to ensure that the
140
+ * {@link module:editor-classic/classiceditoruiview~ClassicEditorUIView#stickyPanel sticky panel}
141
+ * used by the editor UI will not get obscured by the dialog when the dialog uses one of its automatic positions.
142
+ */ _initDialogPluginIntegration() {
143
+ if (!this.editor.plugins.has('Dialog')) {
144
+ return;
145
+ }
146
+ const stickyPanel = this.view.stickyPanel;
147
+ const dialogPlugin = this.editor.plugins.get('Dialog');
148
+ dialogPlugin.on('show', ()=>{
149
+ const dialogView = dialogPlugin.view;
150
+ dialogView.on('moveTo', (evt, data)=>{
151
+ // Engage only when the panel is sticky, and the dialog is using one of default positions.
152
+ if (!stickyPanel.isSticky || dialogView.wasMoved) {
153
+ return;
154
+ }
155
+ const stickyPanelContentRect = new Rect(stickyPanel.contentPanelElement);
156
+ if (data[1] < stickyPanelContentRect.bottom + DialogView.defaultOffset) {
157
+ data[1] = stickyPanelContentRect.bottom + DialogView.defaultOffset;
158
+ }
159
+ }, {
160
+ priority: 'high'
161
+ });
162
+ }, {
163
+ priority: 'low'
164
+ });
165
+ }
166
+ /**
167
+ * Creates an instance of the classic editor UI class.
168
+ *
169
+ * @param editor The editor instance.
170
+ * @param view The view of the UI.
171
+ */ constructor(editor, view){
172
+ super(editor);
173
+ this.view = view;
174
+ this._toolbarConfig = normalizeToolbarConfig(editor.config.get('toolbar'));
175
+ this._elementReplacer = new ElementReplacer();
176
+ this.listenTo(editor.editing.view, 'scrollToTheSelection', this._handleScrollToTheSelectionWithStickyPanel.bind(this));
177
+ }
178
+ }
179
+
180
+ class ClassicEditorUIView extends BoxedEditorUIView {
181
+ /**
182
+ * @inheritDoc
183
+ */ render() {
184
+ super.render();
185
+ if (this.menuBarView) {
186
+ // Set toolbar as a child of a stickyPanel and makes toolbar sticky.
187
+ this.stickyPanel.content.addMany([
188
+ this.menuBarView,
189
+ this.toolbar
190
+ ]);
191
+ } else {
192
+ this.stickyPanel.content.add(this.toolbar);
193
+ }
194
+ this.top.add(this.stickyPanel);
195
+ this.main.add(this.editable);
196
+ }
197
+ /**
198
+ * Creates an instance of the classic editor UI view.
199
+ *
200
+ * @param locale The {@link module:core/editor/editor~Editor#locale} instance.
201
+ * @param editingView The editing view instance this view is related to.
202
+ * @param options Configuration options for the view instance.
203
+ * @param options.shouldToolbarGroupWhenFull When set `true` enables automatic items grouping
204
+ * in the main {@link module:editor-classic/classiceditoruiview~ClassicEditorUIView#toolbar toolbar}.
205
+ * See {@link module:ui/toolbar/toolbarview~ToolbarOptions#shouldGroupWhenFull} to learn more.
206
+ */ constructor(locale, editingView, options = {}){
207
+ super(locale);
208
+ this.stickyPanel = new StickyPanelView(locale);
209
+ this.toolbar = new ToolbarView(locale, {
210
+ shouldGroupWhenFull: options.shouldToolbarGroupWhenFull
211
+ });
212
+ if (options.useMenuBar) {
213
+ this.menuBarView = new MenuBarView(locale);
214
+ }
215
+ this.editable = new InlineEditableUIView(locale, editingView);
216
+ }
217
+ }
218
+
219
+ /**
220
+ * The {@glink installation/getting-started/predefined-builds#classic-editor classic editor} implementation.
221
+ * It uses an inline editable and a sticky toolbar, all enclosed in a boxed UI.
222
+ * See the {@glink examples/builds/classic-editor demo}.
223
+ *
224
+ * In order to create a classic editor instance, use the static
225
+ * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`} method.
226
+ *
227
+ * # Classic editor and classic build
228
+ *
229
+ * The classic editor can be used directly from source (if you installed the
230
+ * [`@ckeditor/ckeditor5-editor-classic`](https://www.npmjs.com/package/@ckeditor/ckeditor5-editor-classic) package)
231
+ * but it is also available in the {@glink installation/getting-started/predefined-builds#classic-editor classic build}.
232
+ *
233
+ * {@glink installation/getting-started/predefined-builds Builds}
234
+ * are ready-to-use editors with plugins bundled in. When using the editor from
235
+ * source you need to take care of loading all plugins by yourself
236
+ * (through the {@link module:core/editor/editorconfig~EditorConfig#plugins `config.plugins`} option).
237
+ * Using the editor from source gives much better flexibility and allows easier customization.
238
+ *
239
+ * Read more about initializing the editor from source or as a build in
240
+ * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`}.
241
+ */ class ClassicEditor extends ElementApiMixin(Editor) {
242
+ /**
243
+ * Destroys the editor instance, releasing all resources used by it.
244
+ *
245
+ * Updates the original editor element with the data if the
246
+ * {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy `updateSourceElementOnDestroy`}
247
+ * configuration option is set to `true`.
248
+ */ destroy() {
249
+ if (this.sourceElement) {
250
+ this.updateSourceElement();
251
+ }
252
+ this.ui.destroy();
253
+ return super.destroy();
254
+ }
255
+ /**
256
+ * Creates a new classic editor instance.
257
+ *
258
+ * There are three ways how the editor can be initialized.
259
+ *
260
+ * # Replacing a DOM element (and loading data from it)
261
+ *
262
+ * You can initialize the editor using an existing DOM element:
263
+ *
264
+ * ```ts
265
+ * ClassicEditor
266
+ * .create( document.querySelector( '#editor' ) )
267
+ * .then( editor => {
268
+ * console.log( 'Editor was initialized', editor );
269
+ * } )
270
+ * .catch( err => {
271
+ * console.error( err.stack );
272
+ * } );
273
+ * ```
274
+ *
275
+ * The element's content will be used as the editor data and the element will be replaced by the editor UI.
276
+ *
277
+ * # Creating a detached editor
278
+ *
279
+ * Alternatively, you can initialize the editor by passing the initial data directly as a string.
280
+ * In this case, the editor will render an element that must be inserted into the DOM:
281
+ *
282
+ * ```ts
283
+ * ClassicEditor
284
+ * .create( '<p>Hello world!</p>' )
285
+ * .then( editor => {
286
+ * console.log( 'Editor was initialized', editor );
287
+ *
288
+ * // Initial data was provided so the editor UI element needs to be added manually to the DOM.
289
+ * document.body.appendChild( editor.ui.element );
290
+ * } )
291
+ * .catch( err => {
292
+ * console.error( err.stack );
293
+ * } );
294
+ * ```
295
+ *
296
+ * This lets you dynamically append the editor to your web page whenever it is convenient for you. You may use this method if your
297
+ * web page content is generated on the client side and the DOM structure is not ready at the moment when you initialize the editor.
298
+ *
299
+ * # Replacing a DOM element (and data provided in `config.initialData`)
300
+ *
301
+ * You can also mix these two ways by providing a DOM element to be used and passing the initial data through the configuration:
302
+ *
303
+ * ```ts
304
+ * ClassicEditor
305
+ * .create( document.querySelector( '#editor' ), {
306
+ * initialData: '<h2>Initial data</h2><p>Foo bar.</p>'
307
+ * } )
308
+ * .then( editor => {
309
+ * console.log( 'Editor was initialized', editor );
310
+ * } )
311
+ * .catch( err => {
312
+ * console.error( err.stack );
313
+ * } );
314
+ * ```
315
+ *
316
+ * This method can be used to initialize the editor on an existing element with the specified content in case if your integration
317
+ * makes it difficult to set the content of the source element.
318
+ *
319
+ * Note that an error will be thrown if you pass the initial data both as the first parameter and also in the configuration.
320
+ *
321
+ * # Configuring the editor
322
+ *
323
+ * See the {@link module:core/editor/editorconfig~EditorConfig editor configuration documentation} to learn more about
324
+ * customizing plugins, toolbar and more.
325
+ *
326
+ * # Using the editor from source
327
+ *
328
+ * The code samples listed in the previous sections of this documentation assume that you are using an
329
+ * {@glink installation/getting-started/predefined-builds editor build} (for example – `@ckeditor/ckeditor5-build-classic`).
330
+ *
331
+ * If you want to use the classic editor from source (`@ckeditor/ckeditor5-editor-classic/src/classiceditor`),
332
+ * you need to define the list of
333
+ * {@link module:core/editor/editorconfig~EditorConfig#plugins plugins to be initialized} and
334
+ * {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar items}. Read more about using the editor from
335
+ * source in the {@glink installation/advanced/alternative-setups/integrating-from-source-webpack dedicated guide}.
336
+ *
337
+ * @param sourceElementOrData The DOM element that will be the source for the created editor
338
+ * or the editor's initial data.
339
+ *
340
+ * If a DOM element is passed, its content will be automatically loaded to the editor upon initialization
341
+ * and the {@link module:editor-classic/classiceditorui~ClassicEditorUI#element editor element} will replace the passed element
342
+ * in the DOM (the original one will be hidden and the editor will be injected next to it).
343
+ *
344
+ * If the {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy updateSourceElementOnDestroy}
345
+ * 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,
346
+ * in which this element is contained, is submitted (if the original element is a `<textarea>`). This ensures seamless integration
347
+ * with native web forms.
348
+ *
349
+ * If the initial data is passed, a detached editor will be created. In this case you need to insert it into the DOM manually.
350
+ * It is available under the {@link module:editor-classic/classiceditorui~ClassicEditorUI#element `editor.ui.element`} property.
351
+ *
352
+ * @param config The editor configuration.
353
+ * @returns A promise resolved once the editor is ready. The promise resolves with the created editor instance.
354
+ */ static create(sourceElementOrData, config = {}) {
355
+ return new Promise((resolve)=>{
356
+ const editor = new this(sourceElementOrData, config);
357
+ resolve(editor.initPlugins().then(()=>editor.ui.init(isElement(sourceElementOrData) ? sourceElementOrData : null)).then(()=>editor.data.init(editor.config.get('initialData'))).then(()=>editor.fire('ready')).then(()=>editor));
358
+ });
359
+ }
360
+ /**
361
+ * Creates an instance of the classic editor.
362
+ *
363
+ * **Note:** do not use the constructor to create editor instances. Use the static
364
+ * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`} method instead.
365
+ *
366
+ * @param sourceElementOrData The DOM element that will be the source for the created editor
367
+ * or the editor's initial data. For more information see
368
+ * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`}.
369
+ * @param config The editor configuration.
370
+ */ constructor(sourceElementOrData, config = {}){
371
+ // If both `config.initialData` is set and initial data is passed as the constructor parameter, then throw.
372
+ if (!isElement(sourceElementOrData) && config.initialData !== undefined) {
373
+ // Documented in core/editor/editorconfig.jsdoc.
374
+ // eslint-disable-next-line ckeditor5-rules/ckeditor-error-message
375
+ throw new CKEditorError('editor-create-initial-data', null);
376
+ }
377
+ super(config);
378
+ this.config.define('menuBar.isVisible', false);
379
+ if (this.config.get('initialData') === undefined) {
380
+ this.config.set('initialData', getInitialData(sourceElementOrData));
381
+ }
382
+ if (isElement(sourceElementOrData)) {
383
+ this.sourceElement = sourceElementOrData;
384
+ }
385
+ this.model.document.createRoot();
386
+ const shouldToolbarGroupWhenFull = !this.config.get('toolbar.shouldNotGroupWhenFull');
387
+ const menuBarConfig = this.config.get('menuBar');
388
+ const view = new ClassicEditorUIView(this.locale, this.editing.view, {
389
+ shouldToolbarGroupWhenFull,
390
+ useMenuBar: menuBarConfig.isVisible
391
+ });
392
+ this.ui = new ClassicEditorUI(this, view);
393
+ attachToForm(this);
394
+ }
395
+ }
396
+ /**
397
+ * The {@link module:core/context~Context} class.
398
+ *
399
+ * Exposed as static editor field for easier access in editor builds.
400
+ */ ClassicEditor.Context = Context;
401
+ /**
402
+ * The {@link module:watchdog/editorwatchdog~EditorWatchdog} class.
403
+ *
404
+ * Exposed as static editor field for easier access in editor builds.
405
+ */ ClassicEditor.EditorWatchdog = EditorWatchdog;
406
+ /**
407
+ * The {@link module:watchdog/contextwatchdog~ContextWatchdog} class.
408
+ *
409
+ * Exposed as static editor field for easier access in editor builds.
410
+ */ ClassicEditor.ContextWatchdog = ContextWatchdog;
411
+ function getInitialData(sourceElementOrData) {
412
+ return isElement(sourceElementOrData) ? getDataFromElement(sourceElementOrData) : sourceElementOrData;
413
+ }
414
+ function isElement(value) {
415
+ return isElement$1(value);
416
+ }
417
+
418
+ export { ClassicEditor };
419
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.js","../src/classiceditorui.ts","../src/classiceditoruiview.ts","../src/classiceditor.ts"],"names":["ClassicEditorUI","EditorUI","element","view","init","replacementElement","editor","editingView","editing","editable","editingRoot","document","getRoot","name","rootName","render","editableElement","setEditableElement","bind","to","focusTracker","attachDomRoot","_elementReplacer","replace","_initPlaceholder","_initToolbar","menuBarView","_initMenuBar","_initDialogPluginIntegration","fire","destroy","restore","detachDomRoot","stickyPanel","limiterElement","top","toolbar","fillFromConfig","_toolbarConfig","componentFactory","addToolbar","sourceElement","placeholderText","placeholder","config","get","tagName","toLowerCase","getAttribute","enablePlaceholder","isDirectHost","keepOnFocus","_handleScrollToTheSelectionWithStickyPanel","evt","data","originalArgs","isSticky","stickyPanelHeight","Rect","height","viewportOffset","scrollViewportOnPanelGettingSticky","scrollToTheSelection","listenTo","setTimeout","stopListening","plugins","has","dialogPlugin","on","dialogView","wasMoved","stickyPanelContentRect","contentPanelElement","bottom","DialogView","defaultOffset","priority","constructor","normalizeToolbarConfig","ElementReplacer","ClassicEditorUIView","BoxedEditorUIView","content","addMany","add","main","locale","options","StickyPanelView","ToolbarView","shouldGroupWhenFull","shouldToolbarGroupWhenFull","useMenuBar","MenuBarView","InlineEditableUIView","ClassicEditor","ElementApiMixin","Editor","updateSourceElement","ui","create","sourceElementOrData","Promise","resolve","initPlugins","then","isElement","initialData","undefined","CKEditorError","define","set","getInitialData","model","createRoot","menuBarConfig","isVisible","attachToForm","Context","EditorWatchdog","ContextWatchdog","getDataFromElement","value","_isElement"],"mappings":";;;;AAAA,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,YAAY,CAAC,CAAC,UAAU,CAAC,CAAC,sBAAsB,CAAC,CAAC,iBAAiB,CAAC,CAAC,eAAe,CAAC,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACtM,MAAM,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAC7E,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,CAAC,aAAa,CAA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ineEditableUIView } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { enablePlaceholder } from '@ckeditor/ckeditor5-engine/dist/index.js';\nimport { Rect, ElementReplacer, CKEditorError, getDataFromElement } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { ElementApiMixin, Editor, attachToForm, Context } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { EditorWatchdog, ContextWatchdog } from '@ckeditor/ckeditor5-watchdog/dist/index.js';\nimport { isElement as isElement$1 } from 'lodash-es';\n\nclass ClassicEditorUI extends EditorUI {\n /**\n * @inheritDoc\n */ get element() {\n return this.view.element;\n }\n /**\n * Initializes the UI.\n *\n * @param replacementElement The DOM element that will be the source for the created editor.\n */ init(replacementElement) {\n const editor = this.editor;\n const view = this.view;\n const editingView = editor.editing.view;\n const editable = view.editable;\n const editingRoot = editingView.document.getRoot();\n // The editable UI and editing root should share the same name. Then name is used\n // to recognize the particular editable, for instance in ARIA attributes.\n editable.name = editingRoot.rootName;\n view.render();\n // The editable UI element in DOM is available for sure only after the editor UI view has been rendered.\n // But it can be available earlier if a DOM element has been passed to BalloonEditor.create().\n const editableElement = editable.element;\n // Register the editable UI view in the editor. A single editor instance can aggregate multiple\n // editable areas (roots) but the classic editor has only one.\n this.setEditableElement(editable.name, editableElement);\n // Let the editable UI element respond to the changes in the global editor focus\n // tracker. It has been added to the same tracker a few lines above but, in reality, there are\n // many focusable areas in the editor, like balloons, toolbars or dropdowns and as long\n // as they have focus, the editable should act like it is focused too (although technically\n // it isn't), e.g. by setting the proper CSS class, visually announcing focus to the user.\n // Doing otherwise will result in editable focus styles disappearing, once e.g. the\n // toolbar gets focused.\n view.editable.bind('isFocused').to(this.focusTracker);\n // Bind the editable UI element to the editing view, making it an end– and entry–point\n // of the editor's engine. This is where the engine meets the UI.\n editingView.attachDomRoot(editableElement);\n // If an element containing the initial data of the editor was provided, replace it with\n // an editor instance's UI in DOM until the editor is destroyed. For instance, a <textarea>\n // can be such element.\n if (replacementElement) {\n this._elementReplacer.replace(replacementElement, this.element);\n }\n this._initPlaceholder();\n this._initToolbar();\n if (view.menuBarView) {\n _initMenuBar(editor, view.menuBarView);\n }\n this._initDialogPluginIntegration();\n this.fire('ready');\n }\n /**\n * @inheritDoc\n */ destroy() {\n super.destroy();\n const view = this.view;\n const editingView = this.editor.editing.view;\n this._elementReplacer.restore();\n editingView.detachDomRoot(view.editable.name);\n view.destroy();\n }\n /**\n * Initializes the editor toolbar.\n */ _initToolbar() {\n const view = this.view;\n // Set–up the sticky panel with toolbar.\n view.stickyPanel.bind('isActive').to(this.focusTracker, 'isFocused');\n view.stickyPanel.limiterElement = view.element;\n view.stickyPanel.bind('viewportTopOffset').to(this, 'viewportOffset', ({ top })=>top || 0);\n view.toolbar.fillFromConfig(this._toolbarConfig, this.componentFactory);\n // Register the toolbar so it becomes available for Alt+F10 and Esc navigation.\n this.addToolbar(view.toolbar);\n }\n /**\n * Enable the placeholder text on the editing root.\n */ _initPlaceholder() {\n const editor = this.editor;\n const editingView = editor.editing.view;\n const editingRoot = editingView.document.getRoot();\n const sourceElement = editor.sourceElement;\n let placeholderText;\n const placeholder = editor.config.get('placeholder');\n if (placeholder) {\n placeholderText = typeof placeholder === 'string' ? placeholder : placeholder[this.view.editable.name];\n }\n if (!placeholderText && sourceElement && sourceElement.tagName.toLowerCase() === 'textarea') {\n placeholderText = sourceElement.getAttribute('placeholder');\n }\n if (placeholderText) {\n editingRoot.placeholder = placeholderText;\n }\n enablePlaceholder({\n view: editingView,\n element: editingRoot,\n isDirectHost: false,\n keepOnFocus: true\n });\n }\n /**\n * Provides an integration between the sticky toolbar and {@link module:utils/dom/scroll~scrollViewportToShowTarget}.\n * It allows the UI-agnostic engine method to consider the geometry of the\n * {@link module:editor-classic/classiceditoruiview~ClassicEditorUIView#stickyPanel} that pins to the\n * edge of the viewport and can obscure the user caret after scrolling the window.\n *\n * @param evt The `scrollToTheSelection` event info.\n * @param data The payload carried by the `scrollToTheSelection` event.\n * @param originalArgs The original arguments passed to `scrollViewportToShowTarget()` method (see implementation to learn more).\n */ _handleScrollToTheSelectionWithStickyPanel(evt, data, originalArgs) {\n const stickyPanel = this.view.stickyPanel;\n if (stickyPanel.isSticky) {\n const stickyPanelHeight = new Rect(stickyPanel.element).height;\n data.viewportOffset.top += stickyPanelHeight;\n } else {\n const scrollViewportOnPanelGettingSticky = ()=>{\n this.editor.editing.view.scrollToTheSelection(originalArgs);\n };\n this.listenTo(stickyPanel, 'change:isSticky', scrollViewportOnPanelGettingSticky);\n // This works as a post-scroll-fixer because it's impossible predict whether the panel will be sticky after scrolling or not.\n // Listen for a short period of time only and if the toolbar does not become sticky very soon, cancel the listener.\n setTimeout(()=>{\n this.stopListening(stickyPanel, 'change:isSticky', scrollViewportOnPanelGettingSticky);\n }, 20);\n }\n }\n /**\n * Provides an integration between the sticky toolbar and {@link module:ui/dialog/dialog the Dialog plugin}.\n *\n * It moves the dialog down to ensure that the\n * {@link module:editor-classic/classiceditoruiview~ClassicEditorUIView#stickyPanel sticky panel}\n * used by the editor UI will not get obscured by the dialog when the dialog uses one of its automatic positions.\n */ _initDialogPluginIntegration() {\n if (!this.editor.plugins.has('Dialog')) {\n return;\n }\n const stickyPanel = this.view.stickyPanel;\n const dialogPlugin = this.editor.plugins.get('Dialog');\n dialogPlugin.on('show', ()=>{\n const dialogView = dialogPlugin.view;\n dialogView.on('moveTo', (evt, data)=>{\n // Engage only when the panel is sticky, and the dialog is using one of default positions.\n if (!stickyPanel.isSticky || dialogView.wasMoved) {\n return;\n }\n const stickyPanelContentRect = new Rect(stickyPanel.contentPanelElement);\n if (data[1] < stickyPanelContentRect.bottom + DialogView.defaultOffset) {\n data[1] = stickyPanelContentRect.bottom + DialogView.defaultOffset;\n }\n }, {\n priority: 'high'\n });\n }, {\n priority: 'low'\n });\n }\n /**\n * Creates an instance of the classic editor UI class.\n *\n * @param editor The editor instance.\n * @param view The view of the UI.\n */ constructor(editor, view){\n super(editor);\n this.view = view;\n this._toolbarConfig = normalizeToolbarConfig(editor.config.get('toolbar'));\n this._elementReplacer = new ElementReplacer();\n this.listenTo(editor.editing.view, 'scrollToTheSelection', this._handleScrollToTheSelectionWithStickyPanel.bind(this));\n }\n}\n\nclass ClassicEditorUIView extends BoxedEditorUIView {\n /**\n * @inheritDoc\n */ render() {\n super.render();\n if (this.menuBarView) {\n // Set toolbar as a child of a stickyPanel and makes toolbar sticky.\n this.stickyPanel.content.addMany([\n this.menuBarView,\n this.toolbar\n ]);\n } else {\n this.stickyPanel.content.add(this.toolbar);\n }\n this.top.add(this.stickyPanel);\n this.main.add(this.editable);\n }\n /**\n * Creates an instance of the classic editor UI view.\n *\n * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n * @param editingView The editing view instance this view is related to.\n * @param options Configuration options for the view instance.\n * @param options.shouldToolbarGroupWhenFull When set `true` enables automatic items grouping\n * in the main {@link module:editor-classic/classiceditoruiview~ClassicEditorUIView#toolbar toolbar}.\n * See {@link module:ui/toolbar/toolbarview~ToolbarOptions#shouldGroupWhenFull} to learn more.\n */ constructor(locale, editingView, options = {}){\n super(locale);\n this.stickyPanel = new StickyPanelView(locale);\n this.toolbar = new ToolbarView(locale, {\n shouldGroupWhenFull: options.shouldToolbarGroupWhenFull\n });\n if (options.useMenuBar) {\n this.menuBarView = new MenuBarView(locale);\n }\n this.editable = new InlineEditableUIView(locale, editingView);\n }\n}\n\n/**\n * The {@glink installation/getting-started/predefined-builds#classic-editor classic editor} implementation.\n * It uses an inline editable and a sticky toolbar, all enclosed in a boxed UI.\n * See the {@glink examples/builds/classic-editor demo}.\n *\n * In order to create a classic editor instance, use the static\n * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`} method.\n *\n * # Classic editor and classic build\n *\n * The classic editor can be used directly from source (if you installed the\n * [`@ckeditor/ckeditor5-editor-classic`](https://www.npmjs.com/package/@ckeditor/ckeditor5-editor-classic) package)\n * but it is also available in the {@glink installation/getting-started/predefined-builds#classic-editor classic build}.\n *\n * {@glink installation/getting-started/predefined-builds Builds}\n * are ready-to-use editors with plugins bundled in. When using the editor from\n * source you need to take care of loading all plugins by yourself\n * (through the {@link module:core/editor/editorconfig~EditorConfig#plugins `config.plugins`} option).\n * Using the editor from source gives much better flexibility and allows easier customization.\n *\n * Read more about initializing the editor from source or as a build in\n * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`}.\n */ class ClassicEditor extends ElementApiMixin(Editor) {\n /**\n * Destroys the editor instance, releasing all resources used by it.\n *\n * Updates the original editor element with the data if the\n * {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy `updateSourceElementOnDestroy`}\n * configuration option is set to `true`.\n */ destroy() {\n if (this.sourceElement) {\n this.updateSourceElement();\n }\n this.ui.destroy();\n return super.destroy();\n }\n /**\n * Creates a new classic editor instance.\n *\n * There are three ways how the editor can be initialized.\n *\n * # Replacing a DOM element (and loading data from it)\n *\n * You can initialize the editor using an existing DOM element:\n *\n * ```ts\n * ClassicEditor\n * \t.create( document.querySelector( '#editor' ) )\n * \t.then( editor => {\n * \t\tconsole.log( 'Editor was initialized', editor );\n * \t} )\n * \t.catch( err => {\n * \t\tconsole.error( err.stack );\n * \t} );\n * ```\n *\n * The element's content will be used as the editor data and the element will be replaced by the editor UI.\n *\n * # Creating a detached editor\n *\n * Alternatively, you can initialize the editor by passing the initial data directly as a string.\n * In this case, the editor will render an element that must be inserted into the DOM:\n *\n * ```ts\n * ClassicEditor\n * \t.create( '<p>Hello world!</p>' )\n * \t.then( editor => {\n * \t\tconsole.log( 'Editor was initialized', editor );\n *\n * \t\t// Initial data was provided so the editor UI element needs to be added manually to the DOM.\n * \t\tdocument.body.appendChild( editor.ui.element );\n * \t} )\n * \t.catch( err => {\n * \t\tconsole.error( err.stack );\n * \t} );\n * ```\n *\n * This lets you dynamically append the editor to your web page whenever it is convenient for you. You may use this method if your\n * web page content is generated on the client side and the DOM structure is not ready at the moment when you initialize the editor.\n *\n * # Replacing a DOM element (and data provided in `config.initialData`)\n *\n * You can also mix these two ways by providing a DOM element to be used and passing the initial data through the configuration:\n *\n * ```ts\n * ClassicEditor\n * \t.create( document.querySelector( '#editor' ), {\n * \t\tinitialData: '<h2>Initial data</h2><p>Foo bar.</p>'\n * \t} )\n * \t.then( editor => {\n * \t\tconsole.log( 'Editor was initialized', editor );\n * \t} )\n * \t.catch( err => {\n * \t\tconsole.error( err.stack );\n * \t} );\n * ```\n *\n * This method can be used to initialize the editor on an existing element with the specified content in case if your integration\n * makes it difficult to set the content of the source element.\n *\n * Note that an error will be thrown if you pass the initial data both as the first parameter and also in the configuration.\n *\n * # Configuring the editor\n *\n * See the {@link module:core/editor/editorconfig~EditorConfig editor configuration documentation} to learn more about\n * customizing plugins, toolbar and more.\n *\n * # Using the editor from source\n *\n * The code samples listed in the previous sections of this documentation assume that you are using an\n * {@glink installation/getting-started/predefined-builds editor build} (for example – `@ckeditor/ckeditor5-build-classic`).\n *\n * If you want to use the classic editor from source (`@ckeditor/ckeditor5-editor-classic/src/classiceditor`),\n * you need to define the list of\n * {@link module:core/editor/editorconfig~EditorConfig#plugins plugins to be initialized} and\n * {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar items}. Read more about using the editor from\n * source in the {@glink installation/advanced/alternative-setups/integrating-from-source-webpack dedicated guide}.\n *\n * @param sourceElementOrData The DOM element that will be the source for the created editor\n * or the editor's initial data.\n *\n * If a DOM element is passed, its content will be automatically loaded to the editor upon initialization\n * and the {@link module:editor-classic/classiceditorui~ClassicEditorUI#element editor element} will replace the passed element\n * in the DOM (the original one will be hidden and the editor will be injected next to it).\n *\n * If the {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy updateSourceElementOnDestroy}\n * 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,\n * in which this element is contained, is submitted (if the original element is a `<textarea>`). This ensures seamless integration\n * with native web forms.\n *\n * If the initial data is passed, a detached editor will be created. In this case you need to insert it into the DOM manually.\n * It is available under the {@link module:editor-classic/classiceditorui~ClassicEditorUI#element `editor.ui.element`} property.\n *\n * @param config The editor configuration.\n * @returns A promise resolved once the editor is ready. The promise resolves with the created editor instance.\n */ static create(sourceElementOrData, config = {}) {\n return new Promise((resolve)=>{\n const editor = new this(sourceElementOrData, config);\n resolve(editor.initPlugins().then(()=>editor.ui.init(isElement(sourceElementOrData) ? sourceElementOrData : null)).then(()=>editor.data.init(editor.config.get('initialData'))).then(()=>editor.fire('ready')).then(()=>editor));\n });\n }\n /**\n * Creates an instance of the classic editor.\n *\n * **Note:** do not use the constructor to create editor instances. Use the static\n * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`} method instead.\n *\n * @param sourceElementOrData The DOM element that will be the source for the created editor\n * or the editor's initial data. For more information see\n * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`}.\n * @param config The editor configuration.\n */ constructor(sourceElementOrData, config = {}){\n // If both `config.initialData` is set and initial data is passed as the constructor parameter, then throw.\n if (!isElement(sourceElementOrData) && config.initialData !== undefined) {\n // Documented in core/editor/editorconfig.jsdoc.\n // eslint-disable-next-line ckeditor5-rules/ckeditor-error-message\n throw new CKEditorError('editor-create-initial-data', null);\n }\n super(config);\n this.config.define('menuBar.isVisible', false);\n if (this.config.get('initialData') === undefined) {\n this.config.set('initialData', getInitialData(sourceElementOrData));\n }\n if (isElement(sourceElementOrData)) {\n this.sourceElement = sourceElementOrData;\n }\n this.model.document.createRoot();\n const shouldToolbarGroupWhenFull = !this.config.get('toolbar.shouldNotGroupWhenFull');\n const menuBarConfig = this.config.get('menuBar');\n const view = new ClassicEditorUIView(this.locale, this.editing.view, {\n shouldToolbarGroupWhenFull,\n useMenuBar: menuBarConfig.isVisible\n });\n this.ui = new ClassicEditorUI(this, view);\n attachToForm(this);\n }\n}\n/**\n * The {@link module:core/context~Context} class.\n *\n * Exposed as static editor field for easier access in editor builds.\n */ ClassicEditor.Context = Context;\n/**\n * The {@link module:watchdog/editorwatchdog~EditorWatchdog} class.\n *\n * Exposed as static editor field for easier access in editor builds.\n */ ClassicEditor.EditorWatchdog = EditorWatchdog;\n/**\n * The {@link module:watchdog/contextwatchdog~ContextWatchdog} class.\n *\n * Exposed as static editor field for easier access in editor builds.\n */ ClassicEditor.ContextWatchdog = ContextWatchdog;\nfunction getInitialData(sourceElementOrData) {\n return isElement(sourceElementOrData) ? getDataFromElement(sourceElementOrData) : sourceElementOrData;\n}\nfunction isElement(value) {\n return isElement$1(value);\n}\n\nexport { ClassicEditor };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module editor-classic/classiceditorui\n */\n\nimport type { Editor, ElementApi } from 'ckeditor5/src/core.js';\nimport {\n\tEditorUI,\n\tDialogView,\n\tnormalizeToolbarConfig,\n\t_initMenuBar,\n\ttype DialogViewMoveToEvent,\n\ttype Dialog,\n\ttype EditorUIReadyEvent,\n\ttype EditorUIView,\n\ttype MenuBarView\n} from 'ckeditor5/src/ui.js';\nimport {\n\tenablePlaceholder,\n\ttype ViewScrollToTheSelectionEvent\n} from 'ckeditor5/src/engine.js';\nimport { ElementReplacer, Rect, type EventInfo } from 'ckeditor5/src/utils.js';\nimport type ClassicEditorUIView from './classiceditoruiview.js';\n\n/**\n * The classic editor UI class.\n */\nexport default class ClassicEditorUI extends EditorUI {\n\t/**\n\t * The main (top–most) view of the editor UI.\n\t */\n\tpublic readonly view: ClassicEditorUIView;\n\n\t/**\n\t * A normalized `config.toolbar` object.\n\t */\n\tprivate readonly _toolbarConfig: ReturnType<typeof normalizeToolbarConfig>;\n\n\t/**\n\t * The element replacer instance used to hide the editor's source element.\n\t */\n\tprivate readonly _elementReplacer: ElementReplacer;\n\n\t/**\n\t * Creates an instance of the classic editor UI class.\n\t *\n\t * @param editor The editor instance.\n\t * @param view The view of the UI.\n\t */\n\tconstructor( editor: Editor, view: ClassicEditorUIView ) {\n\t\tsuper( editor );\n\n\t\tthis.view = view;\n\t\tthis._toolbarConfig = normalizeToolbarConfig( editor.config.get( 'toolbar' ) );\n\n\t\tthis._elementReplacer = new ElementReplacer();\n\n\t\tthis.listenTo<ViewScrollToTheSelectionEvent>(\n\t\t\teditor.editing.view, 'scrollToTheSelection', this._handleScrollToTheSelectionWithStickyPanel.bind( this ) );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override get element(): HTMLElement | null {\n\t\treturn this.view.element;\n\t}\n\n\t/**\n\t * Initializes the UI.\n\t *\n\t * @param replacementElement The DOM element that will be the source for the created editor.\n\t */\n\tpublic init( replacementElement: HTMLElement | null ): void {\n\t\tconst editor = this.editor;\n\t\tconst view = this.view;\n\t\tconst editingView = editor.editing.view;\n\t\tconst editable = view.editable;\n\t\tconst editingRoot = editingView.document.getRoot()!;\n\n\t\t// The editable UI and editing root should share the same name. Then name is used\n\t\t// to recognize the particular editable, for instance in ARIA attributes.\n\t\teditable.name = editingRoot.rootName;\n\n\t\tview.render();\n\n\t\t// The editable UI element in DOM is available for sure only after the editor UI view has been rendered.\n\t\t// But it can be available earlier if a DOM element has been passed to BalloonEditor.create().\n\t\tconst editableElement = editable.element!;\n\n\t\t// Register the editable UI view in the editor. A single editor instance can aggregate multiple\n\t\t// editable areas (roots) but the classic editor has only one.\n\t\tthis.setEditableElement( editable.name, editableElement );\n\n\t\t// Let the editable UI element respond to the changes in the global editor focus\n\t\t// tracker. It has been added to the same tracker a few lines above but, in reality, there are\n\t\t// many focusable areas in the editor, like balloons, toolbars or dropdowns and as long\n\t\t// as they have focus, the editable should act like it is focused too (although technically\n\t\t// it isn't), e.g. by setting the proper CSS class, visually announcing focus to the user.\n\t\t// Doing otherwise will result in editable focus styles disappearing, once e.g. the\n\t\t// toolbar gets focused.\n\t\tview.editable.bind( 'isFocused' ).to( this.focusTracker );\n\n\t\t// Bind the editable UI element to the editing view, making it an end– and entry–point\n\t\t// of the editor's engine. This is where the engine meets the UI.\n\t\teditingView.attachDomRoot( editableElement );\n\n\t\t// If an element containing the initial data of the editor was provided, replace it with\n\t\t// an editor instance's UI in DOM until the editor is destroyed. For instance, a <textarea>\n\t\t// can be such element.\n\t\tif ( replacementElement ) {\n\t\t\tthis._elementReplacer.replace( replacementElement, this.element as HTMLElement | undefined );\n\t\t}\n\n\t\tthis._initPlaceholder();\n\t\tthis._initToolbar();\n\n\t\tif ( view.menuBarView ) {\n\t\t\t_initMenuBar( editor, view.menuBarView );\n\t\t}\n\n\t\tthis._initDialogPluginIntegration();\n\t\tthis.fire<EditorUIReadyEvent>( 'ready' );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tconst view = this.view;\n\t\tconst editingView = this.editor.editing.view;\n\n\t\tthis._elementReplacer.restore();\n\t\teditingView.detachDomRoot( view.editable.name! );\n\t\tview.destroy();\n\t}\n\n\t/**\n\t * Initializes the editor toolbar.\n\t */\n\tprivate _initToolbar(): void {\n\t\tconst view = this.view;\n\n\t\t// Set–up the sticky panel with toolbar.\n\t\tview.stickyPanel.bind( 'isActive' ).to( this.focusTracker, 'isFocused' );\n\t\tview.stickyPanel.limiterElement = view.element;\n\t\tview.stickyPanel.bind( 'viewportTopOffset' ).to( this, 'viewportOffset', ( { top } ) => top || 0 );\n\n\t\tview.toolbar.fillFromConfig( this._toolbarConfig, this.componentFactory );\n\n\t\t// Register the toolbar so it becomes available for Alt+F10 and Esc navigation.\n\t\tthis.addToolbar( view.toolbar );\n\t}\n\n\t/**\n\t * Enable the placeholder text on the editing root.\n\t */\n\tprivate _initPlaceholder(): void {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\t\tconst editingRoot = editingView.document.getRoot()!;\n\t\tconst sourceElement = ( editor as Editor & ElementApi ).sourceElement;\n\n\t\tlet placeholderText;\n\t\tconst placeholder = editor.config.get( 'placeholder' );\n\n\t\tif ( placeholder ) {\n\t\t\tplaceholderText = typeof placeholder === 'string' ? placeholder : placeholder[ this.view.editable.name! ];\n\t\t}\n\n\t\tif ( !placeholderText && sourceElement && sourceElement.tagName.toLowerCase() === 'textarea' ) {\n\t\t\tplaceholderText = sourceElement.getAttribute( 'placeholder' );\n\t\t}\n\n\t\tif ( placeholderText ) {\n\t\t\teditingRoot.placeholder = placeholderText;\n\t\t}\n\n\t\tenablePlaceholder( {\n\t\t\tview: editingView,\n\t\t\telement: editingRoot,\n\t\t\tisDirectHost: false,\n\t\t\tkeepOnFocus: true\n\t\t} );\n\t}\n\n\t/**\n\t * Provides an integration between the sticky toolbar and {@link module:utils/dom/scroll~scrollViewportToShowTarget}.\n\t * It allows the UI-agnostic engine method to consider the geometry of the\n\t * {@link module:editor-classic/classiceditoruiview~ClassicEditorUIView#stickyPanel} that pins to the\n\t * edge of the viewport and can obscure the user caret after scrolling the window.\n\t *\n\t * @param evt The `scrollToTheSelection` event info.\n\t * @param data The payload carried by the `scrollToTheSelection` event.\n\t * @param originalArgs The original arguments passed to `scrollViewportToShowTarget()` method (see implementation to learn more).\n\t */\n\tprivate _handleScrollToTheSelectionWithStickyPanel(\n\t\tevt: EventInfo<'scrollToTheSelection'>,\n\t\tdata: ViewScrollToTheSelectionEvent[ 'args' ][ 0 ],\n\t\toriginalArgs: ViewScrollToTheSelectionEvent[ 'args' ][ 1 ]\n\t): void {\n\t\tconst stickyPanel = this.view.stickyPanel;\n\n\t\tif ( stickyPanel.isSticky ) {\n\t\t\tconst stickyPanelHeight = new Rect( stickyPanel.element! ).height;\n\n\t\t\tdata.viewportOffset.top += stickyPanelHeight;\n\t\t} else {\n\t\t\tconst scrollViewportOnPanelGettingSticky = () => {\n\t\t\t\tthis.editor.editing.view.scrollToTheSelection( originalArgs );\n\t\t\t};\n\n\t\t\tthis.listenTo( stickyPanel, 'change:isSticky', scrollViewportOnPanelGettingSticky );\n\n\t\t\t// This works as a post-scroll-fixer because it's impossible predict whether the panel will be sticky after scrolling or not.\n\t\t\t// Listen for a short period of time only and if the toolbar does not become sticky very soon, cancel the listener.\n\t\t\tsetTimeout( () => {\n\t\t\t\tthis.stopListening( stickyPanel, 'change:isSticky', scrollViewportOnPanelGettingSticky );\n\t\t\t}, 20 );\n\t\t}\n\t}\n\n\t/**\n\t * Provides an integration between the sticky toolbar and {@link module:ui/dialog/dialog the Dialog plugin}.\n\t *\n\t * It moves the dialog down to ensure that the\n\t * {@link module:editor-classic/classiceditoruiview~ClassicEditorUIView#stickyPanel sticky panel}\n\t * used by the editor UI will not get obscured by the dialog when the dialog uses one of its automatic positions.\n\t */\n\tprivate _initDialogPluginIntegration(): void {\n\t\tif ( !this.editor.plugins.has( 'Dialog' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst stickyPanel = this.view.stickyPanel;\n\t\tconst dialogPlugin: Dialog = this.editor.plugins.get( 'Dialog' );\n\n\t\tdialogPlugin.on( 'show', () => {\n\t\t\tconst dialogView = dialogPlugin.view!;\n\n\t\t\tdialogView.on<DialogViewMoveToEvent>( 'moveTo', ( evt, data ) => {\n\t\t\t\t// Engage only when the panel is sticky, and the dialog is using one of default positions.\n\t\t\t\tif ( !stickyPanel.isSticky || dialogView.wasMoved ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst stickyPanelContentRect = new Rect( stickyPanel.contentPanelElement );\n\n\t\t\t\tif ( data[ 1 ] < stickyPanelContentRect.bottom + DialogView.defaultOffset ) {\n\t\t\t\t\tdata[ 1 ] = stickyPanelContentRect.bottom + DialogView.defaultOffset;\n\t\t\t\t}\n\t\t\t}, { priority: 'high' } );\n\t\t}, { priority: 'low' } );\n\t}\n}\n\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module editor-classic/classiceditoruiview\n */\n\nimport { BoxedEditorUIView, InlineEditableUIView, MenuBarView, StickyPanelView, ToolbarView } from 'ckeditor5/src/ui.js';\nimport type { Locale } from 'ckeditor5/src/utils.js';\nimport type { EditingView } from 'ckeditor5/src/engine.js';\n\nimport '../theme/classiceditor.css';\n\n/**\n * Classic editor UI view. Uses an inline editable and a sticky toolbar, all\n * enclosed in a boxed UI view.\n */\nexport default class ClassicEditorUIView extends BoxedEditorUIView {\n\t/**\n\t * Sticky panel view instance. This is a parent view of a {@link #toolbar}\n\t * that makes toolbar sticky.\n\t */\n\tpublic readonly stickyPanel: StickyPanelView;\n\n\t/**\n\t * Toolbar view instance.\n\t */\n\tpublic readonly toolbar: ToolbarView;\n\n\t/**\n\t * Menu bar view instance.\n\t */\n\tpublic readonly menuBarView?: MenuBarView;\n\n\t/**\n\t * Editable UI view.\n\t */\n\tpublic readonly editable: InlineEditableUIView;\n\n\t/**\n\t * Creates an instance of the classic editor UI view.\n\t *\n\t * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t * @param editingView The editing view instance this view is related to.\n\t * @param options Configuration options for the view instance.\n\t * @param options.shouldToolbarGroupWhenFull When set `true` enables automatic items grouping\n\t * in the main {@link module:editor-classic/classiceditoruiview~ClassicEditorUIView#toolbar toolbar}.\n\t * See {@link module:ui/toolbar/toolbarview~ToolbarOptions#shouldGroupWhenFull} to learn more.\n\t */\n\tconstructor(\n\t\tlocale: Locale,\n\t\teditingView: EditingView,\n\t\toptions: {\n\t\t\tshouldToolbarGroupWhenFull?: boolean;\n\t\t\tuseMenuBar?: boolean;\n\t\t} = {}\n\t) {\n\t\tsuper( locale );\n\n\t\tthis.stickyPanel = new StickyPanelView( locale );\n\n\t\tthis.toolbar = new ToolbarView( locale, {\n\t\t\tshouldGroupWhenFull: options.shouldToolbarGroupWhenFull\n\t\t} );\n\n\t\tif ( options.useMenuBar ) {\n\t\t\tthis.menuBarView = new MenuBarView( locale );\n\t\t}\n\n\t\tthis.editable = new InlineEditableUIView( locale, editingView );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tif ( this.menuBarView ) {\n\t\t\t// Set toolbar as a child of a stickyPanel and makes toolbar sticky.\n\t\t\tthis.stickyPanel.content.addMany( [ this.menuBarView, this.toolbar ] );\n\t\t} else {\n\t\t\tthis.stickyPanel.content.add( this.toolbar );\n\t\t}\n\n\t\tthis.top.add( this.stickyPanel );\n\t\tthis.main.add( this.editable );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module editor-classic/classiceditor\n */\n\nimport ClassicEditorUI from './classiceditorui.js';\nimport ClassicEditorUIView from './classiceditoruiview.js';\n\nimport {\n\tEditor,\n\tContext,\n\tElementApiMixin,\n\tattachToForm,\n\ttype EditorConfig,\n\ttype EditorReadyEvent\n} from 'ckeditor5/src/core.js';\nimport { getDataFromElement, CKEditorError } from 'ckeditor5/src/utils.js';\n\nimport { ContextWatchdog, EditorWatchdog } from 'ckeditor5/src/watchdog.js';\n\nimport { isElement as _isElement } from 'lodash-es';\n\n/**\n * The {@glink installation/getting-started/predefined-builds#classic-editor classic editor} implementation.\n * It uses an inline editable and a sticky toolbar, all enclosed in a boxed UI.\n * See the {@glink examples/builds/classic-editor demo}.\n *\n * In order to create a classic editor instance, use the static\n * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`} method.\n *\n * # Classic editor and classic build\n *\n * The classic editor can be used directly from source (if you installed the\n * [`@ckeditor/ckeditor5-editor-classic`](https://www.npmjs.com/package/@ckeditor/ckeditor5-editor-classic) package)\n * but it is also available in the {@glink installation/getting-started/predefined-builds#classic-editor classic build}.\n *\n * {@glink installation/getting-started/predefined-builds Builds}\n * are ready-to-use editors with plugins bundled in. When using the editor from\n * source you need to take care of loading all plugins by yourself\n * (through the {@link module:core/editor/editorconfig~EditorConfig#plugins `config.plugins`} option).\n * Using the editor from source gives much better flexibility and allows easier customization.\n *\n * Read more about initializing the editor from source or as a build in\n * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`}.\n */\nexport default class ClassicEditor extends ElementApiMixin( Editor ) {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic readonly ui: ClassicEditorUI;\n\n\t/**\n\t * Creates an instance of the classic editor.\n\t *\n\t * **Note:** do not use the constructor to create editor instances. Use the static\n\t * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`} method instead.\n\t *\n\t * @param sourceElementOrData The DOM element that will be the source for the created editor\n\t * or the editor's initial data. For more information see\n\t * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`}.\n\t * @param config The editor configuration.\n\t */\n\tprotected constructor( sourceElementOrData: HTMLElement | string, config: EditorConfig = {} ) {\n\t\t// If both `config.initialData` is set and initial data is passed as the constructor parameter, then throw.\n\t\tif ( !isElement( sourceElementOrData ) && config.initialData !== undefined ) {\n\t\t\t// Documented in core/editor/editorconfig.jsdoc.\n\t\t\t// eslint-disable-next-line ckeditor5-rules/ckeditor-error-message\n\t\t\tthrow new CKEditorError( 'editor-create-initial-data', null );\n\t\t}\n\n\t\tsuper( config );\n\n\t\tthis.config.define( 'menuBar.isVisible', false );\n\n\t\tif ( this.config.get( 'initialData' ) === undefined ) {\n\t\t\tthis.config.set( 'initialData', getInitialData( sourceElementOrData ) );\n\t\t}\n\n\t\tif ( isElement( sourceElementOrData ) ) {\n\t\t\tthis.sourceElement = sourceElementOrData;\n\t\t}\n\n\t\tthis.model.document.createRoot();\n\n\t\tconst shouldToolbarGroupWhenFull = !this.config.get( 'toolbar.shouldNotGroupWhenFull' );\n\n\t\tconst menuBarConfig = this.config.get( 'menuBar' )!;\n\n\t\tconst view = new ClassicEditorUIView( this.locale, this.editing.view, {\n\t\t\tshouldToolbarGroupWhenFull,\n\t\t\tuseMenuBar: menuBarConfig.isVisible\n\t\t} );\n\n\t\tthis.ui = new ClassicEditorUI( this, view );\n\n\t\tattachToForm( this );\n\t}\n\n\t/**\n\t * Destroys the editor instance, releasing all resources used by it.\n\t *\n\t * Updates the original editor element with the data if the\n\t * {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy `updateSourceElementOnDestroy`}\n\t * configuration option is set to `true`.\n\t */\n\tpublic override destroy(): Promise<unknown> {\n\t\tif ( this.sourceElement ) {\n\t\t\tthis.updateSourceElement();\n\t\t}\n\n\t\tthis.ui.destroy();\n\n\t\treturn super.destroy();\n\t}\n\n\t/**\n\t * Creates a new classic editor instance.\n\t *\n\t * There are three ways how the editor can be initialized.\n\t *\n\t * # Replacing a DOM element (and loading data from it)\n\t *\n\t * You can initialize the editor using an existing DOM element:\n\t *\n\t * ```ts\n\t * ClassicEditor\n\t * \t.create( document.querySelector( '#editor' ) )\n\t * \t.then( editor => {\n\t * \t\tconsole.log( 'Editor was initialized', editor );\n\t * \t} )\n\t * \t.catch( err => {\n\t * \t\tconsole.error( err.stack );\n\t * \t} );\n\t * ```\n\t *\n\t * The element's content will be used as the editor data and the element will be replaced by the editor UI.\n\t *\n\t * # Creating a detached editor\n\t *\n\t * Alternatively, you can initialize the editor by passing the initial data directly as a string.\n\t * In this case, the editor will render an element that must be inserted into the DOM:\n\t *\n\t * ```ts\n\t * ClassicEditor\n\t * \t.create( '<p>Hello world!</p>' )\n\t * \t.then( editor => {\n\t * \t\tconsole.log( 'Editor was initialized', editor );\n\t *\n\t * \t\t// Initial data was provided so the editor UI element needs to be added manually to the DOM.\n\t * \t\tdocument.body.appendChild( editor.ui.element );\n\t * \t} )\n\t * \t.catch( err => {\n\t * \t\tconsole.error( err.stack );\n\t * \t} );\n\t * ```\n\t *\n\t * This lets you dynamically append the editor to your web page whenever it is convenient for you. You may use this method if your\n\t * web page content is generated on the client side and the DOM structure is not ready at the moment when you initialize the editor.\n\t *\n\t * # Replacing a DOM element (and data provided in `config.initialData`)\n\t *\n\t * You can also mix these two ways by providing a DOM element to be used and passing the initial data through the configuration:\n\t *\n\t * ```ts\n\t * ClassicEditor\n\t * \t.create( document.querySelector( '#editor' ), {\n\t * \t\tinitialData: '<h2>Initial data</h2><p>Foo bar.</p>'\n\t * \t} )\n\t * \t.then( editor => {\n\t * \t\tconsole.log( 'Editor was initialized', editor );\n\t * \t} )\n\t * \t.catch( err => {\n\t * \t\tconsole.error( err.stack );\n\t * \t} );\n\t * ```\n\t *\n\t * This method can be used to initialize the editor on an existing element with the specified content in case if your integration\n\t * makes it difficult to set the content of the source element.\n\t *\n\t * Note that an error will be thrown if you pass the initial data both as the first parameter and also in the configuration.\n\t *\n\t * # Configuring the editor\n\t *\n\t * See the {@link module:core/editor/editorconfig~EditorConfig editor configuration documentation} to learn more about\n\t * customizing plugins, toolbar and more.\n\t *\n\t * # Using the editor from source\n\t *\n\t * The code samples listed in the previous sections of this documentation assume that you are using an\n\t * {@glink installation/getting-started/predefined-builds editor build} (for example – `@ckeditor/ckeditor5-build-classic`).\n\t *\n\t * If you want to use the classic editor from source (`@ckeditor/ckeditor5-editor-classic/src/classiceditor`),\n\t * you need to define the list of\n\t * {@link module:core/editor/editorconfig~EditorConfig#plugins plugins to be initialized} and\n\t * {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar items}. Read more about using the editor from\n\t * source in the {@glink installation/advanced/alternative-setups/integrating-from-source-webpack dedicated guide}.\n\t *\n\t * @param sourceElementOrData The DOM element that will be the source for the created editor\n\t * or the editor's initial data.\n\t *\n\t * If a DOM element is passed, its content will be automatically loaded to the editor upon initialization\n\t * and the {@link module:editor-classic/classiceditorui~ClassicEditorUI#element editor element} will replace the passed element\n\t * in the DOM (the original one will be hidden and the editor will be injected next to it).\n\t *\n\t * If the {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy updateSourceElementOnDestroy}\n\t * 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,\n\t * in which this element is contained, is submitted (if the original element is a `<textarea>`). This ensures seamless integration\n\t * with native web forms.\n\t *\n\t * If the initial data is passed, a detached editor will be created. In this case you need to insert it into the DOM manually.\n\t * It is available under the {@link module:editor-classic/classiceditorui~ClassicEditorUI#element `editor.ui.element`} property.\n\t *\n\t * @param config The editor configuration.\n\t * @returns A promise resolved once the editor is ready. The promise resolves with the created editor instance.\n\t */\n\tpublic static override create( sourceElementOrData: HTMLElement | string, config: EditorConfig = {} ): Promise<ClassicEditor> {\n\t\treturn new Promise( resolve => {\n\t\t\tconst editor = new this( sourceElementOrData, config );\n\n\t\t\tresolve(\n\t\t\t\teditor.initPlugins()\n\t\t\t\t\t.then( () => editor.ui.init( isElement( sourceElementOrData ) ? sourceElementOrData : null ) )\n\t\t\t\t\t.then( () => editor.data.init( editor.config.get( 'initialData' )! ) )\n\t\t\t\t\t.then( () => editor.fire<EditorReadyEvent>( 'ready' ) )\n\t\t\t\t\t.then( () => editor )\n\t\t\t);\n\t\t} );\n\t}\n\n\t/**\n\t * The {@link module:core/context~Context} class.\n\t *\n\t * Exposed as static editor field for easier access in editor builds.\n\t */\n\tpublic static Context = Context;\n\n\t/**\n\t * The {@link module:watchdog/editorwatchdog~EditorWatchdog} class.\n\t *\n\t * Exposed as static editor field for easier access in editor builds.\n\t */\n\tpublic static EditorWatchdog = EditorWatchdog;\n\n\t/**\n\t * The {@link module:watchdog/contextwatchdog~ContextWatchdog} class.\n\t *\n\t * Exposed as static editor field for easier access in editor builds.\n\t */\n\tpublic static ContextWatchdog = ContextWatchdog;\n}\n\nfunction getInitialData( sourceElementOrData: HTMLElement | string ): string {\n\treturn isElement( sourceElementOrData ) ? getDataFromElement( sourceElementOrData ) : sourceElementOrData;\n}\n\nfunction isElement( value: any ): value is Element {\n\treturn _isElement( value );\n}\n"]}
@@ -0,0 +1,184 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ /**
10
+ * @module editor-classic/classiceditor
11
+ */
12
+ import ClassicEditorUI from './classiceditorui.js';
13
+ import { Editor, Context, type EditorConfig } from 'ckeditor5/src/core.js';
14
+ import { ContextWatchdog, EditorWatchdog } from 'ckeditor5/src/watchdog.js';
15
+ declare const ClassicEditor_base: import("ckeditor5/src/utils.js").Mixed<typeof Editor, import("ckeditor5/src/core.js").ElementApi>;
16
+ /**
17
+ * The {@glink installation/getting-started/predefined-builds#classic-editor classic editor} implementation.
18
+ * It uses an inline editable and a sticky toolbar, all enclosed in a boxed UI.
19
+ * See the {@glink examples/builds/classic-editor demo}.
20
+ *
21
+ * In order to create a classic editor instance, use the static
22
+ * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`} method.
23
+ *
24
+ * # Classic editor and classic build
25
+ *
26
+ * The classic editor can be used directly from source (if you installed the
27
+ * [`@ckeditor/ckeditor5-editor-classic`](https://www.npmjs.com/package/@ckeditor/ckeditor5-editor-classic) package)
28
+ * but it is also available in the {@glink installation/getting-started/predefined-builds#classic-editor classic build}.
29
+ *
30
+ * {@glink installation/getting-started/predefined-builds Builds}
31
+ * are ready-to-use editors with plugins bundled in. When using the editor from
32
+ * source you need to take care of loading all plugins by yourself
33
+ * (through the {@link module:core/editor/editorconfig~EditorConfig#plugins `config.plugins`} option).
34
+ * Using the editor from source gives much better flexibility and allows easier customization.
35
+ *
36
+ * Read more about initializing the editor from source or as a build in
37
+ * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`}.
38
+ */
39
+ export default class ClassicEditor extends ClassicEditor_base {
40
+ /**
41
+ * @inheritDoc
42
+ */
43
+ readonly ui: ClassicEditorUI;
44
+ /**
45
+ * Creates an instance of the classic editor.
46
+ *
47
+ * **Note:** do not use the constructor to create editor instances. Use the static
48
+ * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`} method instead.
49
+ *
50
+ * @param sourceElementOrData The DOM element that will be the source for the created editor
51
+ * or the editor's initial data. For more information see
52
+ * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`}.
53
+ * @param config The editor configuration.
54
+ */
55
+ protected constructor(sourceElementOrData: HTMLElement | string, config?: EditorConfig);
56
+ /**
57
+ * Destroys the editor instance, releasing all resources used by it.
58
+ *
59
+ * Updates the original editor element with the data if the
60
+ * {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy `updateSourceElementOnDestroy`}
61
+ * configuration option is set to `true`.
62
+ */
63
+ destroy(): Promise<unknown>;
64
+ /**
65
+ * Creates a new classic editor instance.
66
+ *
67
+ * There are three ways how the editor can be initialized.
68
+ *
69
+ * # Replacing a DOM element (and loading data from it)
70
+ *
71
+ * You can initialize the editor using an existing DOM element:
72
+ *
73
+ * ```ts
74
+ * ClassicEditor
75
+ * .create( document.querySelector( '#editor' ) )
76
+ * .then( editor => {
77
+ * console.log( 'Editor was initialized', editor );
78
+ * } )
79
+ * .catch( err => {
80
+ * console.error( err.stack );
81
+ * } );
82
+ * ```
83
+ *
84
+ * The element's content will be used as the editor data and the element will be replaced by the editor UI.
85
+ *
86
+ * # Creating a detached editor
87
+ *
88
+ * Alternatively, you can initialize the editor by passing the initial data directly as a string.
89
+ * In this case, the editor will render an element that must be inserted into the DOM:
90
+ *
91
+ * ```ts
92
+ * ClassicEditor
93
+ * .create( '<p>Hello world!</p>' )
94
+ * .then( editor => {
95
+ * console.log( 'Editor was initialized', editor );
96
+ *
97
+ * // Initial data was provided so the editor UI element needs to be added manually to the DOM.
98
+ * document.body.appendChild( editor.ui.element );
99
+ * } )
100
+ * .catch( err => {
101
+ * console.error( err.stack );
102
+ * } );
103
+ * ```
104
+ *
105
+ * This lets you dynamically append the editor to your web page whenever it is convenient for you. You may use this method if your
106
+ * web page content is generated on the client side and the DOM structure is not ready at the moment when you initialize the editor.
107
+ *
108
+ * # Replacing a DOM element (and data provided in `config.initialData`)
109
+ *
110
+ * You can also mix these two ways by providing a DOM element to be used and passing the initial data through the configuration:
111
+ *
112
+ * ```ts
113
+ * ClassicEditor
114
+ * .create( document.querySelector( '#editor' ), {
115
+ * initialData: '<h2>Initial data</h2><p>Foo bar.</p>'
116
+ * } )
117
+ * .then( editor => {
118
+ * console.log( 'Editor was initialized', editor );
119
+ * } )
120
+ * .catch( err => {
121
+ * console.error( err.stack );
122
+ * } );
123
+ * ```
124
+ *
125
+ * This method can be used to initialize the editor on an existing element with the specified content in case if your integration
126
+ * makes it difficult to set the content of the source element.
127
+ *
128
+ * Note that an error will be thrown if you pass the initial data both as the first parameter and also in the configuration.
129
+ *
130
+ * # Configuring the editor
131
+ *
132
+ * See the {@link module:core/editor/editorconfig~EditorConfig editor configuration documentation} to learn more about
133
+ * customizing plugins, toolbar and more.
134
+ *
135
+ * # Using the editor from source
136
+ *
137
+ * The code samples listed in the previous sections of this documentation assume that you are using an
138
+ * {@glink installation/getting-started/predefined-builds editor build} (for example – `@ckeditor/ckeditor5-build-classic`).
139
+ *
140
+ * If you want to use the classic editor from source (`@ckeditor/ckeditor5-editor-classic/src/classiceditor`),
141
+ * you need to define the list of
142
+ * {@link module:core/editor/editorconfig~EditorConfig#plugins plugins to be initialized} and
143
+ * {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar items}. Read more about using the editor from
144
+ * source in the {@glink installation/advanced/alternative-setups/integrating-from-source-webpack dedicated guide}.
145
+ *
146
+ * @param sourceElementOrData The DOM element that will be the source for the created editor
147
+ * or the editor's initial data.
148
+ *
149
+ * If a DOM element is passed, its content will be automatically loaded to the editor upon initialization
150
+ * and the {@link module:editor-classic/classiceditorui~ClassicEditorUI#element editor element} will replace the passed element
151
+ * in the DOM (the original one will be hidden and the editor will be injected next to it).
152
+ *
153
+ * If the {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy updateSourceElementOnDestroy}
154
+ * 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,
155
+ * in which this element is contained, is submitted (if the original element is a `<textarea>`). This ensures seamless integration
156
+ * with native web forms.
157
+ *
158
+ * If the initial data is passed, a detached editor will be created. In this case you need to insert it into the DOM manually.
159
+ * It is available under the {@link module:editor-classic/classiceditorui~ClassicEditorUI#element `editor.ui.element`} property.
160
+ *
161
+ * @param config The editor configuration.
162
+ * @returns A promise resolved once the editor is ready. The promise resolves with the created editor instance.
163
+ */
164
+ static create(sourceElementOrData: HTMLElement | string, config?: EditorConfig): Promise<ClassicEditor>;
165
+ /**
166
+ * The {@link module:core/context~Context} class.
167
+ *
168
+ * Exposed as static editor field for easier access in editor builds.
169
+ */
170
+ static Context: typeof Context;
171
+ /**
172
+ * The {@link module:watchdog/editorwatchdog~EditorWatchdog} class.
173
+ *
174
+ * Exposed as static editor field for easier access in editor builds.
175
+ */
176
+ static EditorWatchdog: typeof EditorWatchdog;
177
+ /**
178
+ * The {@link module:watchdog/contextwatchdog~ContextWatchdog} class.
179
+ *
180
+ * Exposed as static editor field for easier access in editor builds.
181
+ */
182
+ static ContextWatchdog: typeof ContextWatchdog;
183
+ }
184
+ export {};
@@ -0,0 +1,79 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ /**
10
+ * @module editor-classic/classiceditorui
11
+ */
12
+ import type { Editor } from 'ckeditor5/src/core.js';
13
+ import { EditorUI } from 'ckeditor5/src/ui.js';
14
+ import type ClassicEditorUIView from './classiceditoruiview.js';
15
+ /**
16
+ * The classic editor UI class.
17
+ */
18
+ export default class ClassicEditorUI extends EditorUI {
19
+ /**
20
+ * The main (top–most) view of the editor UI.
21
+ */
22
+ readonly view: ClassicEditorUIView;
23
+ /**
24
+ * A normalized `config.toolbar` object.
25
+ */
26
+ private readonly _toolbarConfig;
27
+ /**
28
+ * The element replacer instance used to hide the editor's source element.
29
+ */
30
+ private readonly _elementReplacer;
31
+ /**
32
+ * Creates an instance of the classic editor UI class.
33
+ *
34
+ * @param editor The editor instance.
35
+ * @param view The view of the UI.
36
+ */
37
+ constructor(editor: Editor, view: ClassicEditorUIView);
38
+ /**
39
+ * @inheritDoc
40
+ */
41
+ get element(): HTMLElement | null;
42
+ /**
43
+ * Initializes the UI.
44
+ *
45
+ * @param replacementElement The DOM element that will be the source for the created editor.
46
+ */
47
+ init(replacementElement: HTMLElement | null): void;
48
+ /**
49
+ * @inheritDoc
50
+ */
51
+ destroy(): void;
52
+ /**
53
+ * Initializes the editor toolbar.
54
+ */
55
+ private _initToolbar;
56
+ /**
57
+ * Enable the placeholder text on the editing root.
58
+ */
59
+ private _initPlaceholder;
60
+ /**
61
+ * Provides an integration between the sticky toolbar and {@link module:utils/dom/scroll~scrollViewportToShowTarget}.
62
+ * It allows the UI-agnostic engine method to consider the geometry of the
63
+ * {@link module:editor-classic/classiceditoruiview~ClassicEditorUIView#stickyPanel} that pins to the
64
+ * edge of the viewport and can obscure the user caret after scrolling the window.
65
+ *
66
+ * @param evt The `scrollToTheSelection` event info.
67
+ * @param data The payload carried by the `scrollToTheSelection` event.
68
+ * @param originalArgs The original arguments passed to `scrollViewportToShowTarget()` method (see implementation to learn more).
69
+ */
70
+ private _handleScrollToTheSelectionWithStickyPanel;
71
+ /**
72
+ * Provides an integration between the sticky toolbar and {@link module:ui/dialog/dialog the Dialog plugin}.
73
+ *
74
+ * It moves the dialog down to ensure that the
75
+ * {@link module:editor-classic/classiceditoruiview~ClassicEditorUIView#stickyPanel sticky panel}
76
+ * used by the editor UI will not get obscured by the dialog when the dialog uses one of its automatic positions.
77
+ */
78
+ private _initDialogPluginIntegration;
79
+ }
@@ -0,0 +1,56 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ /**
10
+ * @module editor-classic/classiceditoruiview
11
+ */
12
+ import { BoxedEditorUIView, InlineEditableUIView, MenuBarView, StickyPanelView, ToolbarView } from 'ckeditor5/src/ui.js';
13
+ import type { Locale } from 'ckeditor5/src/utils.js';
14
+ import type { EditingView } from 'ckeditor5/src/engine.js';
15
+ import '../theme/classiceditor.css';
16
+ /**
17
+ * Classic editor UI view. Uses an inline editable and a sticky toolbar, all
18
+ * enclosed in a boxed UI view.
19
+ */
20
+ export default class ClassicEditorUIView extends BoxedEditorUIView {
21
+ /**
22
+ * Sticky panel view instance. This is a parent view of a {@link #toolbar}
23
+ * that makes toolbar sticky.
24
+ */
25
+ readonly stickyPanel: StickyPanelView;
26
+ /**
27
+ * Toolbar view instance.
28
+ */
29
+ readonly toolbar: ToolbarView;
30
+ /**
31
+ * Menu bar view instance.
32
+ */
33
+ readonly menuBarView?: MenuBarView;
34
+ /**
35
+ * Editable UI view.
36
+ */
37
+ readonly editable: InlineEditableUIView;
38
+ /**
39
+ * Creates an instance of the classic editor UI view.
40
+ *
41
+ * @param locale The {@link module:core/editor/editor~Editor#locale} instance.
42
+ * @param editingView The editing view instance this view is related to.
43
+ * @param options Configuration options for the view instance.
44
+ * @param options.shouldToolbarGroupWhenFull When set `true` enables automatic items grouping
45
+ * in the main {@link module:editor-classic/classiceditoruiview~ClassicEditorUIView#toolbar toolbar}.
46
+ * See {@link module:ui/toolbar/toolbarview~ToolbarOptions#shouldGroupWhenFull} to learn more.
47
+ */
48
+ constructor(locale: Locale, editingView: EditingView, options?: {
49
+ shouldToolbarGroupWhenFull?: boolean;
50
+ useMenuBar?: boolean;
51
+ });
52
+ /**
53
+ * @inheritDoc
54
+ */
55
+ render(): void;
56
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ /**
10
+ * @module editor-classic
11
+ */
12
+ export { default as ClassicEditor } from './classiceditor.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-editor-classic",
3
- "version": "41.3.1",
3
+ "version": "41.4.0",
4
4
  "description": "Classic editor implementation for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -12,7 +12,7 @@
12
12
  "type": "module",
13
13
  "main": "src/index.js",
14
14
  "dependencies": {
15
- "ckeditor5": "41.3.1",
15
+ "ckeditor5": "41.4.0",
16
16
  "lodash-es": "4.17.21"
17
17
  },
18
18
  "author": "CKSource (http://cksource.com/)",
@@ -25,6 +25,7 @@
25
25
  "directory": "packages/ckeditor5-editor-classic"
26
26
  },
27
27
  "files": [
28
+ "dist",
28
29
  "lang",
29
30
  "src/**/*.js",
30
31
  "src/**/*.d.ts",
@@ -20,10 +20,6 @@ export default class ClassicEditorUI extends EditorUI {
20
20
  * A normalized `config.toolbar` object.
21
21
  */
22
22
  private readonly _toolbarConfig;
23
- /**
24
- * A normalized `config.menuBar` object.
25
- */
26
- private readonly _menuBarConfig;
27
23
  /**
28
24
  * The element replacer instance used to hide the editor's source element.
29
25
  */
@@ -53,10 +49,6 @@ export default class ClassicEditorUI extends EditorUI {
53
49
  * Initializes the editor toolbar.
54
50
  */
55
51
  private _initToolbar;
56
- /**
57
- * Initializes the editor menu bar.
58
- */
59
- private _initMenuBar;
60
52
  /**
61
53
  * Enable the placeholder text on the editing root.
62
54
  */
@@ -80,8 +72,4 @@ export default class ClassicEditorUI extends EditorUI {
80
72
  * used by the editor UI will not get obscured by the dialog when the dialog uses one of its automatic positions.
81
73
  */
82
74
  private _initDialogPluginIntegration;
83
- /**
84
- * Handles focus and keystrokes for menu bar element.
85
- */
86
- private _setupMenuBarBehaviors;
87
75
  }
@@ -2,7 +2,7 @@
2
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, normalizeToolbarConfig, normalizeMenuBarConfig, DialogView } from 'ckeditor5/src/ui.js';
5
+ import { EditorUI, DialogView, normalizeToolbarConfig, _initMenuBar } from 'ckeditor5/src/ui.js';
6
6
  import { enablePlaceholder } from 'ckeditor5/src/engine.js';
7
7
  import { ElementReplacer, Rect } from 'ckeditor5/src/utils.js';
8
8
  /**
@@ -19,8 +19,6 @@ export default class ClassicEditorUI extends EditorUI {
19
19
  super(editor);
20
20
  this.view = view;
21
21
  this._toolbarConfig = normalizeToolbarConfig(editor.config.get('toolbar'));
22
- // We use config.define in ClassicEditor, there will always be some configuration.
23
- this._menuBarConfig = normalizeMenuBarConfig(editor.config.get('menuBar') || {});
24
22
  this._elementReplacer = new ElementReplacer();
25
23
  this.listenTo(editor.editing.view, 'scrollToTheSelection', this._handleScrollToTheSelectionWithStickyPanel.bind(this));
26
24
  }
@@ -70,7 +68,9 @@ export default class ClassicEditorUI extends EditorUI {
70
68
  }
71
69
  this._initPlaceholder();
72
70
  this._initToolbar();
73
- this._initMenuBar();
71
+ if (view.menuBarView) {
72
+ _initMenuBar(editor, view.menuBarView);
73
+ }
74
74
  this._initDialogPluginIntegration();
75
75
  this.fire('ready');
76
76
  }
@@ -98,17 +98,6 @@ export default class ClassicEditorUI extends EditorUI {
98
98
  // Register the toolbar so it becomes available for Alt+F10 and Esc navigation.
99
99
  this.addToolbar(view.toolbar);
100
100
  }
101
- /**
102
- * Initializes the editor menu bar.
103
- */
104
- _initMenuBar() {
105
- const view = this.view;
106
- if (!view.menuBarView) {
107
- return;
108
- }
109
- this._setupMenuBarBehaviors(view.menuBarView.element);
110
- view.menuBarView.fillFromConfig(this._menuBarConfig, this.componentFactory);
111
- }
112
101
  /**
113
102
  * Enable the placeholder text on the editing root.
114
103
  */
@@ -190,24 +179,4 @@ export default class ClassicEditorUI extends EditorUI {
190
179
  }, { priority: 'high' });
191
180
  }, { priority: 'low' });
192
181
  }
193
- /**
194
- * Handles focus and keystrokes for menu bar element.
195
- */
196
- _setupMenuBarBehaviors(menuBarViewElement) {
197
- const editor = this.editor;
198
- this.focusTracker.add(menuBarViewElement);
199
- editor.keystrokes.listenTo(menuBarViewElement);
200
- editor.keystrokes.set('Esc', (data, cancel) => {
201
- if (menuBarViewElement.contains(this.focusTracker.focusedElement)) {
202
- editor.editing.view.focus();
203
- cancel();
204
- }
205
- });
206
- editor.keystrokes.set('Alt+F9', (data, cancel) => {
207
- if (!menuBarViewElement.contains(this.focusTracker.focusedElement)) {
208
- this.view.menuBarView.focus();
209
- cancel();
210
- }
211
- });
212
- }
213
182
  }