MCPcopy Index your code
hub / github.com/GrapesJS/react / useEditorOptions

Function useEditorOptions

packages/grapesjs-react/src/context/EditorOptions.tsx:69–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67 * Context used to keep the editor instance once initialized
68 */
69export const useEditorOptions = () => {
70 const context = useContext(EditorOptionsContext);
71
72 if (!context) {
73 throw new Error('useEditorOptions must be used within EditorOptionsProvider');
74 }
75
76 return context;
77};
78
79// export const useEditor = () => {
80// // TODO ensure editor is used inside provider

Callers 10

EditorReady.tsxFile · 0.90
LayersProvider.tsxFile · 0.90
AssetsProvider.tsxFile · 0.90
ModalProvider.tsxFile · 0.90
StylesProvider.tsxFile · 0.90
EditorInstance.tsxFile · 0.90
CanvasFunction · 0.90
BlocksProvider.tsxFile · 0.90
TraitsProvider.tsxFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected