-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Extract plugins/nodes from playground to a new @lexical/react-plugins
package
#2791
Comments
Before you, I remember that at least one other person has proposed the same thing on Discord. Also, I really like the idea of what TinyMCE do on their website: a plugin store where the official ones are and the community can also upload their own. |
Yes, I have been talking about that on Discord today. Did someone else discuss that before?
That may be an idea to consider, based also on the Discord discussion where the Meta team can not maintain and support all plugins users will ever need. |
The As a user of the lexical library, the place where things are is not always easy to understand, although there are good reasons for that. |
yes, https://discord.com/channels/953974421008293909/953974421486436393/983509523958472774
In fact, I think that lexical-react should contain only the logic to be able to use lexical with react, and that each plugin should be in npm packages, to have separation of concepts and install only what one needs. Seeing as how Acy liked the idea when you brought it up yesterday on Discord, I think the only thing missing is the execution. |
Agree, ideally Maybe a npm package per plugin will be overkill, hence the reason for a @lexical/react-plugins package which would contain the ones that are not important/large enough to live in their own separated package.
Same here, but I suspect my bandwidth will be too narrow to tackle it soon. |
I also think it would make sense to extract the plugins into a separate package and maybe even packages, so that users only take what they need, and also easier for updating any said package, I am quite excited to see where lexical goes, but so far it looks good, let's just destructure everything properly for easier maintaining. |
@NineCodes thanks for your comment and support :) Can't we get most of the benefits of "take what you need" with proper tree-shaking of @lexical/react? Maybe the update story is simpler with more atomic packages. Just trying to to understand more about what people are looking for here. |
I update this thread with some features that would allow Lexical to become a more modular library:
|
Hi everyone, In my recent Lexical RTE project, just as the OP, I found myself frequently copying code from the Lexical Playground, particularly for Toolbar and Link Editor functionalities. Recognizing that many of us might be doing the same, I decided to streamline the process. This led to the creation of the Lexical Toolkit, an open-source library designed to simplify our development workflows. Check out the toolkit and consider contributing:
Features
This toolkit embodies the modularity and reusability we've discussed in this thread. I value your feedback and contributions highly. Instead of copying code from the Lexical Playground, consider integrating it into the Lexical Toolkit and using it via our |
Could someone from the Lexical team please provide their vision on the idea of separating Playground plugin/nodes into a separate package (@lexical/react?)? It's not obvious to potential users who come to see the Lexical functionality on the Playground that they need to copy and paste a lot of low-level code into their applications. |
I think the general policy has been to extract stable plug-ins into their own packages, based on demand and generality. Some of them are really just demo code that isn't production quality. |
It sounds logical to not expose the playground plugins (mention, equation,...) directly from the Playground. Although it would make sense to have them somewhere so they can be reused. Some of the playground plugins/nodes could be moved into a separated package (@lexical/react-plugins) and reused by the playground, or anyone else.
This would be also a way to address (in a way) developer requests for unstyled components, as those plugins/nodes ready to be consumed should be usable with any widget toolkit/theming solution.
Please add your thumb-up if you think this would benefit to you and to the community.
The text was updated successfully, but these errors were encountered: