From 31f67071d36ce1fb8dd06cf8ea9e2e14d52bda45 Mon Sep 17 00:00:00 2001 From: Nikita Date: Wed, 25 Dec 2024 16:27:11 +0300 Subject: [PATCH] fixed `press space` feature --- src/editor/extensions/paragraph/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/editor/extensions/paragraph/index.js b/src/editor/extensions/paragraph/index.js index 0a343b9..4848e4b 100644 --- a/src/editor/extensions/paragraph/index.js +++ b/src/editor/extensions/paragraph/index.js @@ -38,10 +38,11 @@ const withMindAI = createHigherOrderComponent((OriginalComponent) => { const { open, setInsertionPlace } = useDispatch('mind/popup'); useEffect(() => { + // Convert content to string, because it is a RichText value. if ( name === 'core/paragraph' && - !previousContent && - content === ' ' + !`${previousContent || ''}` && + `${content || ''}` === ' ' ) { open(); setInsertionPlace('selected-blocks');