
| Current Path : /var/www/html/strat/web/modules/contrib/ckeditor5_premium_features/js/build/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/strat/web/modules/contrib/ckeditor5_premium_features/js/build/toolbarAdapter.js |
/*!
* Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see https://ckeditor.com/legal/ckeditor-oss-license
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.CKEditor5=t():(e.CKEditor5=e.CKEditor5||{},e.CKEditor5.toolbarAdapter=t())}(self,(()=>(()=>{"use strict";var e={d:(t,o)=>{for(var r in o)e.o(o,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:o[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};e.d(t,{default:()=>r});const o=class{constructor(e){this.editor=e,this.elementId=null,void 0!==this.editor.sourceElement&&(this.elementId=this.editor.sourceElement.dataset.ckeditor5PremiumElementId)}processCollaborationCommandDisable(e){if(!this.isCollaborationDisabled())return!1;const t=this.editor.commands._commands.get(e);return void 0===t||t.forceDisabled("premium-features-module"),!0}processRevisionDisable(){return!!this.isCollaborationDisabled()&&(this.editor.plugins.has("RevisionTracker")&&(this.editor.plugins.get("RevisionTracker").isEnabled=!1),!0)}isCollaborationDisabled(){return void 0!==drupalSettings.ckeditor5Premium&&void 0!==drupalSettings.ckeditor5Premium.disableCollaboration&&!0===drupalSettings.ckeditor5Premium.disableCollaboration}getEditorParentContainer(e){let t=document.getElementById(e);for(;t&&void 0!==t&&void 0!==t.classList&&!t.classList.contains("ck-editor-container");)t=t.parentElement;return t&&void 0!==t?t.parentElement:null}getSourceDataSelector(e){return{trackChanges:".track-changes",comments:".comments",revisionHistory:".revision-history",revisionHistoryContainer:".revision-history-container",resolvedSuggestionsComments:".resolved-suggestions-comments"}[e]+"-data"+`[data-ckeditor5-premium-element-id="${this.elementId}"]`}};const r={ToolbarAdapter:class{constructor(e){this.editor=e,this.storage=new o(e)}afterInit(){void 0!==this.editor.sourceElement&&this.editor.on("ready",(()=>{this.toolbarContainer=this.getToolbarElement(this.editor.sourceElement.id),this.toolbarContainer&&this.toolbarContainer.appendChild(this.editor.ui.view.toolbar.element)}))}destroy(){this.toolbarContainer&&(this.toolbarContainer.innerHTML="")}getToolbarElement(e){let t=this.storage.getEditorParentContainer(e);return t?t.querySelector(".ck-toolbar-container"):null}}};return t=t.default})()));