Skip to content

Commit c5e092e

Browse files
committed
chore: add useEditorView to README
1 parent 78aa7cd commit c5e092e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,3 +170,15 @@ const ExampleComponent = () => {
170170
}
171171
```
172172

173+
The editor view is available in descendants of `EditorProvider` via a `useEditorView` hook:
174+
175+
```js
176+
import { useEditorView } from '@aeaton/react-prosemirror'
177+
178+
const ExampleComponent = () => {
179+
const view = useEditorView()
180+
181+
// do something with the view
182+
}
183+
```
184+

0 commit comments

Comments
 (0)