mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-04-20 13:22:04 +02:00
Fix useEditor not inside Slate error caused by introduce useSlateStatic (#4027)
This commit is contained in:
parent
228f4fa94f
commit
b5859b7e2e
@ -1,16 +1,10 @@
|
||||
import { createContext, useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
|
||||
import { ReactEditor } from '../plugin/react-editor'
|
||||
|
||||
/**
|
||||
* A React context for sharing the editor object.
|
||||
* @deprecated Use useSlateStatic instead.
|
||||
*/
|
||||
|
||||
export const EditorContext = createContext<ReactEditor | null>(null)
|
||||
import { EditorContext } from './use-slate-static'
|
||||
|
||||
/**
|
||||
* Get the current editor object from the React context.
|
||||
* @deprecated Use useSlateStatic instead.
|
||||
*/
|
||||
|
||||
export const useEditor = () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user