From 9137a1663f7349da635b2985191c1564dad1bfb2 Mon Sep 17 00:00:00 2001 From: Josh McFarlin <32019743+Josh-McFarlin@users.noreply.github.com> Date: Thu, 20 Feb 2020 20:28:11 -0500 Subject: [PATCH] Fixed incorrect editor usage in Embed example (#3397) --- site/examples/embeds.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/site/examples/embeds.js b/site/examples/embeds.js index fd4d64175..f3dc631f6 100644 --- a/site/examples/embeds.js +++ b/site/examples/embeds.js @@ -5,6 +5,7 @@ import { Editable, withReact, useEditor, + ReactEditor, useFocused, useSelected, } from 'slate-react' @@ -91,7 +92,7 @@ const VideoElement = ({ attributes, children, element }) => { boxSizing: 'border-box', }} onChange={value => { - const path = editor.findPath(element) + const path = ReactEditor.findPath(editor, element) Transforms.setNodes(editor, { url: value }, { at: path }) }} />