fix: store first rte value (#17699)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user