Skip to content

How to replace selected text in MDXEditor via a custom toolbar button and async operation? #750

Closed Answered by petyosi
Hlopa asked this question in Q&A

You must be logged in to vote

You can grab the current Lexical editor through the Gurx hooks. This will return the root editor (usually), or the nested ones, in case you're using nested editors. You can also use rootEditor$. All of those are exported from the package.

const activeEditor = useCellValue(activeEditor$)

Replies: 1 comment 1 reply

You must be logged in to vote
1 reply
@Hlopa

Answer selected by petyosi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants