strapi-plugin-wysiwyg-toastui
strapi-plugin-wysiwyg-toastui copied to clipboard
Fix the timing of setting the editor value
Related to https://github.com/fagbokforlaget/strapi-plugin-wysiwyg-toastui/issues/3
@shardiwal Could you please verify this PR?
@sergeystoma Thank you for this patch it fixed the issue I was having perfectly.
can use componentDidUpdate
componentDidUpdate(prevProps, prevState, snapshot) {
if (this.props.value !== prevProps.value && prevProps.value == null) {
const editor = this.editorRef.current.getInstance();
editor.setMarkdown(this.props.value, false);
}
}