Skip to content

Commit

Permalink
fix: store first rte value (#17699)
Browse files Browse the repository at this point in the history
  • Loading branch information
madsrasmussen authored Dec 2, 2024
1 parent 8141b6b commit 437fcba
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 437fcba

Please sign in to comment.