diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/components/input-tiny-mce/input-tiny-mce.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/components/input-tiny-mce/input-tiny-mce.element.ts index 985a3bf6c3..bebd992be3 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/components/input-tiny-mce/input-tiny-mce.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/components/input-tiny-mce/input-tiny-mce.element.ts @@ -5,7 +5,7 @@ import { uriAttributeSanitizer } from './input-tiny-mce.sanitizer.js'; import { FormControlMixin, UUITextStyles } from '@umbraco-cms/backoffice/external/uui'; import { renderEditor, type tinymce } from '@umbraco-cms/backoffice/external/tinymce'; import { UMB_AUTH, UmbLoggedInUser } from '@umbraco-cms/backoffice/auth'; -import type { +import { TinyMcePluginArguments, UmbDataTypePropertyCollection, UmbTinyMcePluginBase, @@ -167,7 +167,6 @@ export class UmbInputTinyMceElement extends FormControlMixin(UmbLitElement) { this.#editorRef.destroy(); } - // await tinymce.default.init(this._tinyConfig); const editors = await renderEditor(this._tinyConfig); this.#editorRef = editors.pop(); } @@ -204,7 +203,7 @@ export class UmbInputTinyMceElement extends FormControlMixin(UmbLitElement) { // Plugins require a reference to the current editor as a param, so can not // be instantiated until we have an editor for (const plugin of this.#plugins) { - new plugin({ host: this, editor, configuration: this.configuration }); + new plugin({ host: this, editor }); } // define keyboard shortcuts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/components/input-tiny-mce/tiny-mce-plugin.ts b/src/Umbraco.Web.UI.Client/src/packages/core/components/input-tiny-mce/tiny-mce-plugin.ts index 68a048d661..3f8f7715be 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/components/input-tiny-mce/tiny-mce-plugin.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/components/input-tiny-mce/tiny-mce-plugin.ts @@ -1,21 +1,19 @@ -import { UmbLitElement } from '@umbraco-cms/internal/lit-element'; -import type { UmbDataTypePropertyCollection } from '@umbraco-cms/backoffice/components'; +import type { UmbDataTypePropertyCollection, UmbInputTinyMceElement } from '@umbraco-cms/backoffice/components'; import type { tinymce } from '@umbraco-cms/backoffice/external/tinymce'; export class UmbTinyMcePluginBase { - host: UmbLitElement; + host: UmbInputTinyMceElement; editor: tinymce.Editor; configuration?: UmbDataTypePropertyCollection; constructor(arg: TinyMcePluginArguments) { this.host = arg.host; this.editor = arg.editor; - this.configuration = arg.configuration; + this.configuration = arg.host.configuration; } } export interface TinyMcePluginArguments { - host: UmbLitElement; + host: UmbInputTinyMceElement; editor: tinymce.Editor; - configuration?: UmbDataTypePropertyCollection; }