diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/workspace/stylesheet-workspace.context.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/workspace/stylesheet-workspace.context.ts index a56a3dc52d..391bfe0daa 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/workspace/stylesheet-workspace.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/workspace/stylesheet-workspace.context.ts @@ -88,6 +88,9 @@ export class UmbStylesheetWorkspaceContext extends UmbWorkspaceContext`; } + disconnectedCallback(): void { + super.disconnectedCallback(); + console.log('disconnected'); + } + render() { return html`
diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/workspace/views/rich-text-editor/stylesheet-workspace-view-rich-text-editor.element.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/workspace/views/rich-text-editor/stylesheet-workspace-view-rich-text-editor.element.ts index 6faaa34fc2..cf384204a6 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/workspace/views/rich-text-editor/stylesheet-workspace-view-rich-text-editor.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/workspace/views/rich-text-editor/stylesheet-workspace-view-rich-text-editor.element.ts @@ -49,9 +49,9 @@ export class UmbStylesheetWorkspaceViewRichTextEditorElement extends UmbLitEleme constructor() { super(); - //tODO: should this be called something else here? this.consumeContext(UMB_WORKSPACE_CONTEXT, (workspaceContext) => { this.#context = workspaceContext as UmbStylesheetWorkspaceContext; + this.#context.sendContentGetRules(); this.observe(this.#context.content, (content) => { this._content = content ?? ''; @@ -79,6 +79,8 @@ export class UmbStylesheetWorkspaceViewRichTextEditorElement extends UmbLitEleme }); } + + #openModal = (rule: RichTextRuleModel | null = null) => { if (!this._modalContext) throw new Error('Modal context not found'); this.#currentlyEditing = rule;