Skip to content

mdx-editor/element-table-plugin

Repository files navigation

Lexical element node based MDXEditor table plugin

This is an example of an MDXEditor table plugin that uses lexical element nodes to represent table structures.

Warning: Use this as a base for your own table plugin. Most of it is an adaptation of the original lexical table plugin, while removing parts that do not make sense for the markdown table nodes.

The problem

The built-in table plugin uses decorator nodes and nested lexical editors. Nested editors are quite complex to support in collaborative mode (they require nested collaboration plugins to be added).

The trade-off is that lexical element nodes are very restrictive. You cannot use React directly to add interaction to them. This makes building table tools complicated and somewhat brittle - see TableUI.tsx.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages