mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-31 10:51:44 +02:00
Fixed incorrect editor usage in Embed example (#3397)
This commit is contained in:
@@ -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 })
|
||||
}}
|
||||
/>
|
||||
|
Reference in New Issue
Block a user