Fix: about section editor (#7287)
Co-authored-by: Keith Williams <[email protected]> Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
2 files changed
+2
-3
No files matched your search
@@ -349,11 +349,12 @@ export default function ToolbarPlugin(props: TextEditorProps) {
|
||||
$getRoot().select();
|
||||
$insertNodes(nodes);
|
||||
|
||||
editor.registerUpdateListener(({ editorState }) => {
|
||||
editor.registerUpdateListener(({ editorState, prevEditorState }) => {
|
||||
editorState.read(() => {
|
||||
const textInHtml = $generateHtmlFromNodes(editor);
|
||||
props.setText(textInHtml);
|
||||
});
|
||||
if (!prevEditorState._selection) editor.blur();
|
||||
});
|
||||
});
|
||||
}, []);
|
||||
|
||||
Reference in new issue
Block a user