From f0f477226402e8200a35c7244a637437a332e6c1 Mon Sep 17 00:00:00 2001 From: Silas Rhyneer <49383285+CaptainCrouton89@users.noreply.github.com> Date: Fri, 9 Feb 2024 06:54:51 -0600 Subject: [PATCH] fix: automatically inserts an empty text node after inserting an image (#5598) * fix: automatically inserts an empty text node after inserting an image Fixes #5597 * Update site/examples/images.tsx * Update site/examples/images.tsx * Update site/examples/images.tsx --------- Co-authored-by: Dylan Schiemann --- site/examples/images.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/site/examples/images.tsx b/site/examples/images.tsx index f1bd7d7a1..d9c2047f4 100644 --- a/site/examples/images.tsx +++ b/site/examples/images.tsx @@ -82,6 +82,10 @@ const insertImage = (editor, url) => { const text = { text: '' } const image: ImageElement = { type: 'image', url, children: [text] } Transforms.insertNodes(editor, image) + Transforms.insertNodes(editor, { + type: 'paragraph', + children: [{ text: '' }], + }) } const Element = props => {