MCPcopy Index your code
hub / github.com/editablejs/editable / useEditableStatic

Function useEditableStatic

packages/editor/src/hooks/use-editable.tsx:31–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29 * @returns
30 */
31export const useEditableStatic = (): Editable => {
32 const contenxt = React.useContext(EditableStoreContext)
33
34 if (!contenxt) {
35 throw new Error(
36 `The \`useEditableStatic\` hook must be used inside the <EditableProvider> component's context.`,
37 )
38 }
39
40 return contenxt.editor
41}
42
43/**
44 * 实时变化的编辑器对象

Callers 15

touch-point.tsxFile · 0.90
caret.tsxFile · 0.90
TextFunction · 0.90
ContentEditableFunction · 0.90
InputComponentFunction · 0.90
LeafFunction · 0.90
drag-caret.tsxFile · 0.90
StringFunction · 0.90
useEventFunction · 0.90
useSelectionDrawingStoreFunction · 0.90
useSelectionDrawingRectsFunction · 0.90
useGridSelectedFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected