Skip to content

Extending mdx-editor / lexical editor #506

Answered by petyosi
jannikbuschke asked this question in Q&A
Discussion options

You must be logged in to vote

Lexical knowledge is a must if you want to build custom editors, for example. For other things (like support of new syntax), you need understanding of the mdast specifics.

Pure lexical plugins can be integrated. For example, I'm using the MarkdownShortcutsPlugin like this. However, a Lexical plugin "plugin" system is usually just a component that does a bunch of stuff with the editor in useEffect. It's hard to make composition / reusability of state like this, as it will usually lead to a mess of spaghetti hooks and context. That's why I came up with the Gurx patterns.

Hope this makes sense.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@noteverseio
Comment options

@jannikbuschke
Comment options

@NehalDamania
Comment options

@rob-at-airwalk
Comment options

@rob-at-airwalk
Comment options

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