mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-05 05:28:37 +08:00
Tinymce 后续的 value 更新没有设置进去
This commit is contained in:
parent
5aa1373c89
commit
a1969777a6
@ -126,6 +126,17 @@ export default class TinymceEditor extends React.Component<TinymceEditorProps> {
|
||||
tinymce.init(this.config);
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps: TinymceEditorProps) {
|
||||
const props = this.props;
|
||||
|
||||
if (
|
||||
props.model !== prevProps.model &&
|
||||
props.model !== this.currentContent
|
||||
) {
|
||||
this.editor?.setContent(props.model || '');
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
tinymce.remove(this.editor);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user