From 8fc9a2af4ea79ddf1d8b7558708fac1f3af6d1d2 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Tue, 23 Dec 2025 18:33:54 +0000 Subject: [PATCH] Lexical API: Updated docs to reflect public event usage --- dev/docs/wysiwyg-js-api.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dev/docs/wysiwyg-js-api.md b/dev/docs/wysiwyg-js-api.md index e899aa0c8..4b4fafe56 100644 --- a/dev/docs/wysiwyg-js-api.md +++ b/dev/docs/wysiwyg-js-api.md @@ -26,6 +26,15 @@ via its properties: Each of these modules, and the relevant types used within, are documented in detail below. +The API object itself is provided via the [editor-wysiwyg::post-init](./javascript-public-events.md#editor-wysiwygpost-init) +JavaScript public event, so you can access it like so: + +```javascript +window.addEventListener('editor-wysiwyg::post-init', event => { + const {api} = event.detail; +}); +``` + --- ## UI Module