Skip to content

Commit

Permalink
Merge pull request #131 from prezly/fix/DEV-5017-editor-update-value
Browse files Browse the repository at this point in the history
[DEV-5017] Assign value to editor children
  • Loading branch information
aspirisen authored Mar 15, 2022
2 parents 375e8f2 + 65fd7a0 commit 931238d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/slate-editor/src/modules/editor-v4/EditorV4.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ const EditorV4: FunctionComponent<EditorV4Props> = (props) => {
plugins,
});

useEffect(() => {
editor.children = value;
}, [value]);

useEffect(() => {
if (autoFocus) {
EditorCommands.focus(editor);
Expand Down

0 comments on commit 931238d

Please sign in to comment.