()
| 22 | * Context used to keep the editor instance once initialized |
| 23 | */ |
| 24 | export const useEditorInstance = () => { |
| 25 | const context = useContext(EditorInstanceContext); |
| 26 | |
| 27 | if (!context) { |
| 28 | throw new Error('useEditorInstance must be used within EditorInstanceProvider'); |
| 29 | } |
| 30 | |
| 31 | return context; |
| 32 | }; |
| 33 | |
| 34 | /** |
| 35 | * Get the current editor instance. |
no outgoing calls
no test coverage detected