@ckeditor/ckeditor5-editor-multi-root 45.2.1-alpha.9 → 46.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md.
4
- */(()=>{var t={237:t=>{"use strict";t.exports=CKEditor5.dll},311:(t,e,o)=>{t.exports=o(237)("./src/ui.js")},584:(t,e,o)=>{t.exports=o(237)("./src/utils.js")},782:(t,e,o)=>{t.exports=o(237)("./src/core.js")},783:(t,e,o)=>{t.exports=o(237)("./src/engine.js")}},e={};function o(i){var s=e[i];if(void 0!==s)return s.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,o),r.exports}o.d=(t,e)=>{for(var i in e)o.o(e,i)&&!o.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};(()=>{"use strict";o.r(i),o.d(i,{MultiRootEditor:()=>l});var t=o(782),e=o(584),s=o(311),r=o(783);class n extends s.EditorUI{view;_lastFocusedEditableElement;constructor(t,e){super(t),this.view=e,this._lastFocusedEditableElement=null}init(){this.view.render(),this.focusTracker.on("change:focusedElement",(t,e,o)=>{for(const t of Object.values(this.view.editables))o===t.element&&(this._lastFocusedEditableElement=t.element)}),this.focusTracker.on("change:isFocused",(t,e,o)=>{o||(this._lastFocusedEditableElement=null)});for(const t of Object.values(this.view.editables))this.addEditable(t);this._initToolbar(),this.initMenuBar(this.view.menuBarView),this.fire("ready")}addEditable(t,e){const o=t.element;this.editor.editing.view.attachDomRoot(o,t.name),this.setEditableElement(t.name,o),t.bind("isFocused").to(this.focusTracker,"isFocused",this.focusTracker,"focusedElement",(t,e)=>!!t&&(e===o||this._lastFocusedEditableElement===o)),this._initPlaceholder(t,e)}removeEditable(t){const e=this.editor.editing.view;e.getDomRoot(t.name)&&e.detachDomRoot(t.name),t.unbind("isFocused"),this.removeEditableElement(t.name)}destroy(){super.destroy();for(const t of Object.values(this.view.editables))this.removeEditable(t);this.view.destroy()}_initToolbar(){const t=this.editor,e=this.view;e.toolbar.fillFromConfig(t.config.get("toolbar"),this.componentFactory),this.addToolbar(e.toolbar)}_initPlaceholder(t,e){if(!e){const o=this.editor.config.get("placeholder");o&&(e="string"==typeof o?o:o[t.name])}const o=this.editor.editing.view,i=o.document.getRoot(t.name);e&&(i.placeholder=e),(0,r.enablePlaceholder)({view:o,element:i,isDirectHost:!1,keepOnFocus:!0})}}class a extends s.EditorUIView{toolbar;editables;editable;menuBarView;_editingView;constructor(t,e,o,i={}){super(t),this._editingView=e,this.toolbar=new s.ToolbarView(t,{shouldGroupWhenFull:i.shouldToolbarGroupWhenFull}),this.menuBarView=new s.MenuBarView(t),this.editables={};for(const t of o){const e=i.editableElements?i.editableElements[t]:void 0;let{label:o}=i;"object"==typeof o&&(o=o[t]),this.createEditable(t,e,o)}this.editable=Object.values(this.editables)[0],this.toolbar.extendTemplate({attributes:{class:["ck-reset_all","ck-rounded-corners"],dir:t.uiLanguageDirection}}),this.menuBarView.extendTemplate({attributes:{class:["ck-reset_all","ck-rounded-corners"],dir:t.uiLanguageDirection}})}createEditable(t,e,o){const i=new s.InlineEditableUIView(this.locale,this._editingView,e,{label:o});return this.editables[t]=i,i.name=t,this.isRendered&&this.registerChild(i),i}removeEditable(t){const e=this.editables[t];this.isRendered&&this.deregisterChild(e),delete this.editables[t],e.destroy()}render(){super.render(),this.registerChild(Object.values(this.editables)),this.registerChild(this.toolbar),this.registerChild(this.menuBarView)}}function d(t){return function(t){return"object"==typeof t&&null!==t}(t)&&1===t.nodeType&&!function(t){if("object"!=typeof t)return!1;if(null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;if("[object Object]"!==Object.prototype.toString.call(t)){const e=t[Symbol.toStringTag];return null!=e&&(!!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable&&t.toString()===`[object ${e}]`)}let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t)}class l extends t.Editor{static get editorName(){return"MultiRootEditor"}ui;sourceElements;_registeredRootsAttributesKeys=new Set;_readOnlyRootLocks=new Map;constructor(o,i={}){const s=Object.keys(o),r=0===s.length||"string"==typeof o[s[0]];if(r&&void 0!==i.initialData&&Object.keys(i.initialData).length>0)throw new e.CKEditorError("editor-create-initial-data",null);if(super(i),this.sourceElements=r?{}:o,void 0===this.config.get("initialData")){const t={};for(const e of s)t[e]=c(o[e]);this.config.set("initialData",t)}if(!r)for(const e of s)(0,t.secureSourceElement)(this,o[e]);this.editing.view.document.roots.on("add",(t,e)=>{e.unbind("isReadOnly"),e.bind("isReadOnly").to(this.editing.view.document,"isReadOnly",t=>t||this._readOnlyRootLocks.has(e.rootName)),e.on("change:isReadOnly",(t,o,i)=>{const s=this.editing.view.createRangeIn(e);for(const t of s.getItems())t.is("editableElement")&&(t.unbind("isReadOnly"),t.isReadOnly=i)})});for(const t of s)this.model.document.createRoot("$root",t);if(this.config.get("lazyRoots"))for(const t of this.config.get("lazyRoots")){this.model.document.createRoot("$root",t)._isLoaded=!1}if(this.config.get("rootsAttributes")){const t=this.config.get("rootsAttributes");for(const[o,i]of Object.entries(t)){if(!this.model.document.getRoot(o))throw new e.CKEditorError("multi-root-editor-root-attributes-no-root",null);for(const t of Object.keys(i))this.registerRootAttribute(t)}this.data.on("init",()=>{this.model.enqueueChange({isUndoable:!1},e=>{for(const[o,i]of Object.entries(t)){const t=this.model.document.getRoot(o);for(const[o,s]of Object.entries(i))null!==s&&e.setAttribute(o,s,t)}})})}const d={shouldToolbarGroupWhenFull:!this.config.get("toolbar.shouldNotGroupWhenFull"),editableElements:r?void 0:o,label:this.config.get("label")},l=new a(this.locale,this.editing.view,s,d);this.ui=new n(this,l),this.model.document.on("change:data",()=>{const t=this.model.document.differ.getChangedRoots();for(const e of t){const t=this.model.document.getRoot(e.name);"detached"==e.state&&this.fire("detachRoot",t)}for(const e of t){const t=this.model.document.getRoot(e.name);"attached"==e.state&&this.fire("addRoot",t)}}),this.listenTo(this.model,"canEditAt",(t,[e])=>{if(!e)return;let o=!1;for(const t of e.getRanges()){const e=t.root;if(this._readOnlyRootLocks.has(e.rootName)){o=!0;break}}o&&(t.return=!1,t.stop())},{priority:"high"}),this.decorate("loadRoot"),this.on("loadRoot",(t,[o])=>{const i=this.model.document.getRoot(o);if(!i)throw new e.CKEditorError("multi-root-editor-load-root-no-root",this,{rootName:o});i._isLoaded&&((0,e.logWarning)("multi-root-editor-load-root-already-loaded"),t.stop())},{priority:"highest"})}destroy(){const t=this.config.get("updateSourceElementOnDestroy"),o={};for(const e of Object.keys(this.sourceElements))o[e]=t?this.getData({rootName:e}):"";return this.ui.destroy(),super.destroy().then(()=>{for(const t of Object.keys(this.sourceElements))(0,e.setDataInElement)(this.sourceElements[t],o[t])})}addRoot(t,{data:e="",attributes:o={},elementName:i="$root",isUndoable:s=!1}={}){const r=s=>{const r=s.addRoot(t,i);e&&s.insert(this.data.parse(e,r),r,0);for(const t of Object.keys(o))this.registerRootAttribute(t),s.setAttribute(t,o[t],r)};s?this.model.change(r):this.model.enqueueChange({isUndoable:!1},r)}detachRoot(t,e=!1){e?this.model.change(e=>e.detachRoot(t)):this.model.enqueueChange({isUndoable:!1},e=>e.detachRoot(t))}createEditable(t,e,o){const i=this.ui.view.createEditable(t.rootName,void 0,o);return this.ui.addEditable(i,e),this.editing.view.forceRender(),i.element}detachEditable(t){const e=t.rootName,o=this.ui.view.editables[e];return this.ui.removeEditable(o),this.ui.view.removeEditable(e),o.element}loadRoot(t,{data:e="",attributes:o={}}={}){const i=this.model.document.getRoot(t);this.model.enqueueChange({isUndoable:!1},t=>{e&&t.insert(this.data.parse(e,i),i,0);for(const e of Object.keys(o))this.registerRootAttribute(e),t.setAttribute(e,o[e],i);i._isLoaded=!0,this.model.document.differ._bufferRootLoad(i)})}getFullData(t){const e={};for(const o of this.model.document.getRootNames())e[o]=this.data.get({...t,rootName:o});return e}getRootsAttributes(){const t={};for(const e of this.model.document.getRootNames())t[e]=this.getRootAttributes(e);return t}getRootAttributes(t){const e={},o=this.model.document.getRoot(t);for(const t of this._registeredRootsAttributesKeys)e[t]=o.hasAttribute(t)?o.getAttribute(t):null;return e}registerRootAttribute(t){this._registeredRootsAttributesKeys.has(t)||(this._registeredRootsAttributesKeys.add(t),this.editing.model.schema.extend("$root",{allowAttributes:t}))}disableRoot(t,o){if("$graveyard"==t)throw new e.CKEditorError("multi-root-editor-cannot-disable-graveyard-root",this);const i=this._readOnlyRootLocks.get(t);if(i)i.add(o);else{this._readOnlyRootLocks.set(t,new Set([o]));this.editing.view.document.getRoot(t).isReadOnly=!0,Array.from(this.commands.commands()).forEach(t=>t.affectsData&&t.refresh())}}enableRoot(t,e){const o=this._readOnlyRootLocks.get(t);if(o&&o.has(e))if(1===o.size){this._readOnlyRootLocks.delete(t);this.editing.view.document.getRoot(t).isReadOnly=this.isReadOnly,Array.from(this.commands.commands()).forEach(t=>t.affectsData&&t.refresh())}else o.delete(e)}static create(t,o={}){return new Promise(i=>{for(const o of Object.values(t))if(h(o)&&"TEXTAREA"===o.tagName)throw new e.CKEditorError("editor-wrong-element",null);const s=new this(t,o);i(s.initPlugins().then(()=>s.ui.init()).then(()=>(s._verifyRootsWithInitialData(),s.data.init(s.config.get("initialData")))).then(()=>s.fire("ready")).then(()=>s))})}_verifyRootsWithInitialData(){const t=this.config.get("initialData");for(const o of this.model.document.getRootNames())if(!(o in t))throw new e.CKEditorError("multi-root-editor-root-initial-data-mismatch",null);for(const o of Object.keys(t)){const t=this.model.document.getRoot(o);if(!t||!t.isAttached())throw new e.CKEditorError("multi-root-editor-root-initial-data-mismatch",null)}}}function c(t){return h(t)?(0,e.getDataFromElement)(t):t}function h(t){return d(t)}})(),(window.CKEditor5=window.CKEditor5||{}).editorMultiRoot=i})();
4
+ */(()=>{var t={237:t=>{"use strict";t.exports=CKEditor5.dll},311:(t,e,o)=>{t.exports=o(237)("./src/ui.js")},584:(t,e,o)=>{t.exports=o(237)("./src/utils.js")},782:(t,e,o)=>{t.exports=o(237)("./src/core.js")},783:(t,e,o)=>{t.exports=o(237)("./src/engine.js")}},e={};function o(i){var s=e[i];if(void 0!==s)return s.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,o),r.exports}o.d=(t,e)=>{for(var i in e)o.o(e,i)&&!o.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};(()=>{"use strict";o.r(i),o.d(i,{MultiRootEditor:()=>l,MultiRootEditorUI:()=>n,MultiRootEditorUIView:()=>a});var t=o(782),e=o(584),s=o(311),r=o(783);class n extends s.EditorUI{view;_lastFocusedEditableElement;constructor(t,e){super(t),this.view=e,this._lastFocusedEditableElement=null}init(){this.view.render(),this.focusTracker.on("change:focusedElement",(t,e,o)=>{for(const t of Object.values(this.view.editables))o===t.element&&(this._lastFocusedEditableElement=t.element)}),this.focusTracker.on("change:isFocused",(t,e,o)=>{o||(this._lastFocusedEditableElement=null)});for(const t of Object.values(this.view.editables))this.addEditable(t);this._initToolbar(),this.initMenuBar(this.view.menuBarView),this.fire("ready")}addEditable(t,e){const o=t.element;this.editor.editing.view.attachDomRoot(o,t.name),this.setEditableElement(t.name,o),t.bind("isFocused").to(this.focusTracker,"isFocused",this.focusTracker,"focusedElement",(t,e)=>!!t&&(e===o||this._lastFocusedEditableElement===o)),this._initPlaceholder(t,e)}removeEditable(t){const e=this.editor.editing.view;e.getDomRoot(t.name)&&e.detachDomRoot(t.name),t.unbind("isFocused"),this.removeEditableElement(t.name)}destroy(){super.destroy();for(const t of Object.values(this.view.editables))this.removeEditable(t);this.view.destroy()}_initToolbar(){const t=this.editor,e=this.view;e.toolbar.fillFromConfig(t.config.get("toolbar"),this.componentFactory),this.addToolbar(e.toolbar)}_initPlaceholder(t,e){if(!e){const o=this.editor.config.get("placeholder");o&&(e="string"==typeof o?o:o[t.name])}const o=this.editor.editing.view,i=o.document.getRoot(t.name);e&&(i.placeholder=e),(0,r.enableViewPlaceholder)({view:o,element:i,isDirectHost:!1,keepOnFocus:!0})}}class a extends s.EditorUIView{toolbar;editables;editable;menuBarView;_editingView;constructor(t,e,o,i={}){super(t),this._editingView=e,this.toolbar=new s.ToolbarView(t,{shouldGroupWhenFull:i.shouldToolbarGroupWhenFull}),this.menuBarView=new s.MenuBarView(t),this.editables={};for(const t of o){const e=i.editableElements?i.editableElements[t]:void 0;let{label:o}=i;"object"==typeof o&&(o=o[t]),this.createEditable(t,e,o)}this.editable=Object.values(this.editables)[0],this.toolbar.extendTemplate({attributes:{class:["ck-reset_all","ck-rounded-corners"],dir:t.uiLanguageDirection}}),this.menuBarView.extendTemplate({attributes:{class:["ck-reset_all","ck-rounded-corners"],dir:t.uiLanguageDirection}})}createEditable(t,e,o){const i=new s.InlineEditableUIView(this.locale,this._editingView,e,{label:o});return this.editables[t]=i,i.name=t,this.isRendered&&this.registerChild(i),i}removeEditable(t){const e=this.editables[t];this.isRendered&&this.deregisterChild(e),delete this.editables[t],e.destroy()}render(){super.render(),this.registerChild(Object.values(this.editables)),this.registerChild(this.toolbar),this.registerChild(this.menuBarView)}}function d(t){return function(t){return"object"==typeof t&&null!==t}(t)&&1===t.nodeType&&!function(t){if("object"!=typeof t)return!1;if(null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;if("[object Object]"!==Object.prototype.toString.call(t)){const e=t[Symbol.toStringTag];return null!=e&&(!!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable&&t.toString()===`[object ${e}]`)}let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t)}class l extends t.Editor{static get editorName(){return"MultiRootEditor"}ui;sourceElements;_registeredRootsAttributesKeys=new Set;_readOnlyRootLocks=new Map;constructor(o,i={}){const s=Object.keys(o),r=0===s.length||"string"==typeof o[s[0]];if(r&&void 0!==i.initialData&&Object.keys(i.initialData).length>0)throw new e.CKEditorError("editor-create-initial-data",null);if(super(i),this.sourceElements=r?{}:o,void 0===this.config.get("initialData")){const t={};for(const e of s)t[e]=c(o[e]);this.config.set("initialData",t)}if(!r)for(const e of s)(0,t.secureSourceElement)(this,o[e]);this.editing.view.document.roots.on("add",(t,e)=>{e.unbind("isReadOnly"),e.bind("isReadOnly").to(this.editing.view.document,"isReadOnly",t=>t||this._readOnlyRootLocks.has(e.rootName)),e.on("change:isReadOnly",(t,o,i)=>{const s=this.editing.view.createRangeIn(e);for(const t of s.getItems())t.is("editableElement")&&(t.unbind("isReadOnly"),t.isReadOnly=i)})});for(const t of s)this.model.document.createRoot("$root",t);if(this.config.get("lazyRoots"))for(const t of this.config.get("lazyRoots")){this.model.document.createRoot("$root",t)._isLoaded=!1}if(this.config.get("rootsAttributes")){const t=this.config.get("rootsAttributes");for(const[o,i]of Object.entries(t)){if(!this.model.document.getRoot(o))throw new e.CKEditorError("multi-root-editor-root-attributes-no-root",null);for(const t of Object.keys(i))this.registerRootAttribute(t)}this.data.on("init",()=>{this.model.enqueueChange({isUndoable:!1},e=>{for(const[o,i]of Object.entries(t)){const t=this.model.document.getRoot(o);for(const[o,s]of Object.entries(i))null!==s&&e.setAttribute(o,s,t)}})})}const d={shouldToolbarGroupWhenFull:!this.config.get("toolbar.shouldNotGroupWhenFull"),editableElements:r?void 0:o,label:this.config.get("label")},l=new a(this.locale,this.editing.view,s,d);this.ui=new n(this,l),this.model.document.on("change:data",()=>{const t=this.model.document.differ.getChangedRoots();for(const e of t){const t=this.model.document.getRoot(e.name);"detached"==e.state&&this.fire("detachRoot",t)}for(const e of t){const t=this.model.document.getRoot(e.name);"attached"==e.state&&this.fire("addRoot",t)}}),this.listenTo(this.model,"canEditAt",(t,[e])=>{if(!e)return;let o=!1;for(const t of e.getRanges()){const e=t.root;if(this._readOnlyRootLocks.has(e.rootName)){o=!0;break}}o&&(t.return=!1,t.stop())},{priority:"high"}),this.decorate("loadRoot"),this.on("loadRoot",(t,[o])=>{const i=this.model.document.getRoot(o);if(!i)throw new e.CKEditorError("multi-root-editor-load-root-no-root",this,{rootName:o});i._isLoaded&&((0,e.logWarning)("multi-root-editor-load-root-already-loaded"),t.stop())},{priority:"highest"})}destroy(){const t=this.config.get("updateSourceElementOnDestroy"),o={};for(const e of Object.keys(this.sourceElements))o[e]=t?this.getData({rootName:e}):"";return this.ui.destroy(),super.destroy().then(()=>{for(const t of Object.keys(this.sourceElements))(0,e.setDataInElement)(this.sourceElements[t],o[t])})}addRoot(t,{data:e="",attributes:o={},elementName:i="$root",isUndoable:s=!1}={}){const r=s=>{const r=s.addRoot(t,i);e&&s.insert(this.data.parse(e,r),r,0);for(const t of Object.keys(o))this.registerRootAttribute(t),s.setAttribute(t,o[t],r)};s?this.model.change(r):this.model.enqueueChange({isUndoable:!1},r)}detachRoot(t,e=!1){e?this.model.change(e=>e.detachRoot(t)):this.model.enqueueChange({isUndoable:!1},e=>e.detachRoot(t))}createEditable(t,e,o){const i=this.ui.view.createEditable(t.rootName,void 0,o);return this.ui.addEditable(i,e),this.editing.view.forceRender(),i.element}detachEditable(t){const e=t.rootName,o=this.ui.view.editables[e];return this.ui.removeEditable(o),this.ui.view.removeEditable(e),o.element}loadRoot(t,{data:e="",attributes:o={}}={}){const i=this.model.document.getRoot(t);this.model.enqueueChange({isUndoable:!1},t=>{e&&t.insert(this.data.parse(e,i),i,0);for(const e of Object.keys(o))this.registerRootAttribute(e),t.setAttribute(e,o[e],i);i._isLoaded=!0,this.model.document.differ._bufferRootLoad(i)})}getFullData(t){const e={};for(const o of this.model.document.getRootNames())e[o]=this.data.get({...t,rootName:o});return e}getRootsAttributes(){const t={};for(const e of this.model.document.getRootNames())t[e]=this.getRootAttributes(e);return t}getRootAttributes(t){const e={},o=this.model.document.getRoot(t);for(const t of this._registeredRootsAttributesKeys)e[t]=o.hasAttribute(t)?o.getAttribute(t):null;return e}registerRootAttribute(t){this._registeredRootsAttributesKeys.has(t)||(this._registeredRootsAttributesKeys.add(t),this.editing.model.schema.extend("$root",{allowAttributes:t}))}disableRoot(t,o){if("$graveyard"==t)throw new e.CKEditorError("multi-root-editor-cannot-disable-graveyard-root",this);const i=this._readOnlyRootLocks.get(t);if(i)i.add(o);else{this._readOnlyRootLocks.set(t,new Set([o]));this.editing.view.document.getRoot(t).isReadOnly=!0,Array.from(this.commands.commands()).forEach(t=>t.affectsData&&t.refresh())}}enableRoot(t,e){const o=this._readOnlyRootLocks.get(t);if(o&&o.has(e))if(1===o.size){this._readOnlyRootLocks.delete(t);this.editing.view.document.getRoot(t).isReadOnly=this.isReadOnly,Array.from(this.commands.commands()).forEach(t=>t.affectsData&&t.refresh())}else o.delete(e)}static create(t,o={}){return new Promise(i=>{for(const o of Object.values(t))if(h(o)&&"TEXTAREA"===o.tagName)throw new e.CKEditorError("editor-wrong-element",null);const s=new this(t,o);i(s.initPlugins().then(()=>s.ui.init()).then(()=>(s._verifyRootsWithInitialData(),s.data.init(s.config.get("initialData")))).then(()=>s.fire("ready")).then(()=>s))})}_verifyRootsWithInitialData(){const t=this.config.get("initialData");for(const o of this.model.document.getRootNames())if(!(o in t))throw new e.CKEditorError("multi-root-editor-root-initial-data-mismatch",null);for(const o of Object.keys(t)){const t=this.model.document.getRoot(o);if(!t||!t.isAttached())throw new e.CKEditorError("multi-root-editor-root-initial-data-mismatch",null)}}}function c(t){return h(t)?(0,e.getDataFromElement)(t):t}function h(t){return d(t)}})(),(window.CKEditor5=window.CKEditor5||{}).editorMultiRoot=i})();
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@
5
5
  import { Editor, secureSourceElement } from '@ckeditor/ckeditor5-core/dist/index.js';
6
6
  import { CKEditorError, logWarning, setDataInElement, getDataFromElement } from '@ckeditor/ckeditor5-utils/dist/index.js';
7
7
  import { EditorUI, EditorUIView, ToolbarView, MenuBarView, InlineEditableUIView } from '@ckeditor/ckeditor5-ui/dist/index.js';
8
- import { enablePlaceholder } from '@ckeditor/ckeditor5-engine/dist/index.js';
8
+ import { enableViewPlaceholder } from '@ckeditor/ckeditor5-engine/dist/index.js';
9
9
  import { isElement as isElement$1 } from 'es-toolkit/compat';
10
10
 
11
11
  /**
@@ -157,7 +157,7 @@ import { isElement as isElement$1 } from 'es-toolkit/compat';
157
157
  if (placeholder) {
158
158
  editingRoot.placeholder = placeholder;
159
159
  }
160
- enablePlaceholder({
160
+ enableViewPlaceholder({
161
161
  view: editingView,
162
162
  element: editingRoot,
163
163
  isDirectHost: false,
@@ -634,7 +634,7 @@ import { isElement as isElement$1 } from 'es-toolkit/compat';
634
634
  *
635
635
  * After a root is detached all its children are removed, all markers inside it are removed, and whenever something is inserted to it,
636
636
  * it is automatically removed as well. Finally, a detached root is not returned by
637
- * {@link module:engine/model/document~Document#getRootNames} by default.
637
+ * {@link module:engine/model/document~ModelDocument#getRootNames} by default.
638
638
  *
639
639
  * It is possible to re-add a previously detached root calling {@link #addRoot}.
640
640
  *
@@ -735,7 +735,7 @@ import { isElement as isElement$1 } from 'es-toolkit/compat';
735
735
  *
736
736
  * When a root becomes loaded, it will be treated by the editor as though it was just added. This, among others, means that all
737
737
  * related events and mechanisms will be fired, including {@link ~MultiRootEditor#event:addRoot `addRoot` event},
738
- * {@link module:engine/model/document~Document#event:change `model.Document` `change` event}, model post-fixers and conversion.
738
+ * {@link module:engine/model/document~ModelDocument#event:change `model.Document` `change` event}, model post-fixers and conversion.
739
739
  *
740
740
  * Until the root becomes loaded, all above mechanisms are suppressed.
741
741
  *
@@ -819,7 +819,7 @@ import { isElement as isElement$1 } from 'es-toolkit/compat';
819
819
  }
820
820
  /**
821
821
  * Registers given string as a root attribute key. Registered root attributes are added to
822
- * {@link module:engine/model/schema~Schema schema}, and also returned by
822
+ * {@link module:engine/model/schema~ModelSchema schema}, and also returned by
823
823
  * {@link ~MultiRootEditor#getRootAttributes `getRootAttributes()`} and
824
824
  * {@link ~MultiRootEditor#getRootsAttributes `getRootsAttributes()`}.
825
825
  *
@@ -1090,5 +1090,5 @@ function isElement(value) {
1090
1090
  return isElement$1(value);
1091
1091
  }
1092
1092
 
1093
- export { MultiRootEditor };
1093
+ export { MultiRootEditor, MultiRootEditorUI, MultiRootEditorUIView };
1094
1094
  //# sourceMappingURL=index.js.map