fix(dees-input-richtext): Initialize editor and link input element references in firstUpdated to ensure they exist before editor initialization.
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@design.estate/dees-catalog',
|
||||
version: '2.0.5',
|
||||
version: '2.0.6',
|
||||
description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
|
||||
}
|
||||
|
||||
@@ -62,7 +62,6 @@ export class DeesInputRichtext extends DeesInputBase<string> {
|
||||
accessor wordCount: number = 0;
|
||||
|
||||
private editorElement: HTMLElement;
|
||||
|
||||
private linkInputElement: HTMLInputElement;
|
||||
|
||||
public editor: Editor;
|
||||
@@ -234,6 +233,8 @@ export class DeesInputRichtext extends DeesInputBase<string> {
|
||||
|
||||
public async firstUpdated() {
|
||||
await this.updateComplete;
|
||||
this.editorElement = this.shadowRoot.querySelector('.editor-content');
|
||||
this.linkInputElement = this.shadowRoot.querySelector('.link-input input');
|
||||
this.initializeEditor();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user