tiptap/packages/react/src/useReactNodeView.ts

9 lines
232 B
TypeScript
Raw Normal View History

2021-03-15 03:40:40 +08:00
import React, { useContext } from 'react'
export const ReactNodeViewContext = React.createContext<any>({
isEditable: undefined,
onDragStart: undefined,
})
export const useReactNodeView = () => useContext(ReactNodeViewContext)