diff --git a/src/Umbraco.Web.UI.Client/src/packages/tiny-mce/property-editors/tiny-mce/property-editor-ui-tiny-mce.element.ts b/src/Umbraco.Web.UI.Client/src/packages/tiny-mce/property-editors/tiny-mce/property-editor-ui-tiny-mce.element.ts index b10349366ceb..41a5d4b4b0ba 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/tiny-mce/property-editors/tiny-mce/property-editor-ui-tiny-mce.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/tiny-mce/property-editors/tiny-mce/property-editor-ui-tiny-mce.element.ts @@ -45,12 +45,22 @@ export class UmbPropertyEditorUITinyMceElement extends UmbPropertyEditorUiRteEle this._latestMarkup = markup; - this._value = this._value - ? { - ...this._value, - markup: markup, - } - : undefined; + if (this.value) { + this.value = { + ...this.value, + markup: this._latestMarkup, + }; + } else { + this.value = { + markup: this._latestMarkup, + blocks: { + layout: {}, + contentData: [], + settingsData: [], + expose: [], + }, + }; + } this._fireChangeEvent(); } diff --git a/src/Umbraco.Web.UI.Client/src/packages/tiptap/property-editors/tiptap/property-editor-ui-tiptap.element.ts b/src/Umbraco.Web.UI.Client/src/packages/tiptap/property-editors/tiptap/property-editor-ui-tiptap.element.ts index 5cd865f02ce6..2613164ea77d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/tiptap/property-editors/tiptap/property-editor-ui-tiptap.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/tiptap/property-editors/tiptap/property-editor-ui-tiptap.element.ts @@ -40,12 +40,22 @@ export class UmbPropertyEditorUiTiptapElement extends UmbPropertyEditorUiRteElem this._latestMarkup = value; - this._value = this._value - ? { - ...this._value, - markup: this._latestMarkup, - } - : undefined; + if (this.value) { + this.value = { + ...this.value, + markup: this._latestMarkup, + }; + } else { + this.value = { + markup: this._latestMarkup, + blocks: { + layout: {}, + contentData: [], + settingsData: [], + expose: [], + }, + }; + } this._fireChangeEvent(); }