Skip to content

Commit 8fc9a2a

Browse files
committed
Lexical API: Updated docs to reflect public event usage
1 parent 8aec571 commit 8fc9a2a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

dev/docs/wysiwyg-js-api.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ via its properties:
2626

2727
Each of these modules, and the relevant types used within, are documented in detail below.
2828

29+
The API object itself is provided via the [editor-wysiwyg::post-init](./javascript-public-events.md#editor-wysiwygpost-init)
30+
JavaScript public event, so you can access it like so:
31+
32+
```javascript
33+
window.addEventListener('editor-wysiwyg::post-init', event => {
34+
const {api} = event.detail;
35+
});
36+
```
37+
2938
---
3039

3140
## UI Module

0 commit comments

Comments
 (0)