Sha256: 25097b96677a2aef61078964b965b0ddb2ff9aa17ec76b7cc4a1acaf66cf47f9
Contents?: true
Size: 775 Bytes
Versions: 51
Compression:
Stored size: 775 Bytes
Contents
class CKEditorUIPartComponent extends HTMLElement { /** * Lifecycle callback when element is added to DOM * Adds the toolbar to the editor UI */ connectedCallback() { execIfDOMReady(async () => { const uiPart = this.getAttribute('name'); const editor = await this.#queryEditorElement().instancePromise.promise; this.appendChild(editor.ui.view[uiPart].element); }); } /** * Finds the parent editor component * * @private * @returns {CKEditorComponent|null} Parent editor component or null if not found */ #queryEditorElement() { return this.closest('ckeditor-component') || document.body.querySelector('ckeditor-component'); } } customElements.define('ckeditor-ui-part-component', CKEditorUIPartComponent);
Version data entries
51 entries across 51 versions & 2 rubygems