File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1515import React , {
1616 useEffect ,
1717 useState ,
18+ useRef ,
1819 useCallback
1920}
2021 from 'react' ;
@@ -91,7 +92,7 @@ function uuidv4() {
9192 * for details.
9293 */
9394// eslint-disable-next-line react/display-name
94- const SlateAsInputEditor = React . forwardRef ( ( props , editorRef ) => {
95+ const SlateAsInputEditor = React . forwardRef ( ( props , ref ) => {
9596 /**
9697 * Destructure props for efficiency
9798 */
@@ -101,6 +102,11 @@ const SlateAsInputEditor = React.forwardRef((props, editorRef) => {
101102
102103 const editorProps = props . editorProps || Object . create ( null ) ;
103104
105+ /**
106+ * A reference to the Slate Editor.
107+ */
108+ const editorRef = ref || useRef ( null ) ;
109+
104110 /**
105111 * Slate Schema augmented by plugins
106112 */
You can’t perform that action at this time.
0 commit comments