Draft.js no longer maintained
katzmo opened this issue · comments
Draft.js has not been supported for a while and will be fully archived by the end of 2022. See Draft.js README and facebookarchive/draft-js#3136 for more information.
Meta has stared working on a new extensible JavaScript web text-editor framework called Lexical. Migration guides from Draft.js to Lexical is yet to come (facebook/lexical#1641) and the framework is still in "experimental" stage.
What does that mean for Draftail? Are there any plans to fork Draft.js or switch to Lexical?
Hey @katzmo 👋 good question.
Draftail is used in a relatively large CMS called Wagtail, which I work on as part of my day job. As long as the CMS uses Draftail, I’ll keep maintaining the editor, even if Draft.js itself is no longer maintained. We also do occasional feature development to improve how the editor works (currently working on UX improvements in an upcoming v2.0.0 release).
So – Draftail isn’t going away any time soon. There are known issues with it (#138), some due to the editor itself, some due to Draft.js. They don’t prevent the editor from being useful in a real-world setting, though obviously with rough edges in specific circumstances. Technically Draftail still uses an old version of Draft.js from 2018, well before they stopped maintenance, so we’d still have quite a bit of changes from that project to catch up to.
I’ll update the Draftail website and the project README to mention the state of Draft.js as this is super important info for anyone considering the editor.
As far as Lexical – personally I found Facebook’s stewardship of Draft.js as a project to be very poor. The software was great, so I have hopes about Lexical being even better, but I won’t consider it as an option until it’s proving to be battle-tested outside Facebook. Right now for example the documentation isn’t good enough in my opinion for a project of that complexity.
Would it make sense to explore moving to quill or something else for Wagtail?
@dustinblanchard certainly. There are more decent options out there these days compared to when Wagtail made the switch to Draft.js/Draftail (when IE11 support was vital and browsers were much more inconsistent with how much they supported rich text editing).
There’s been some discussions about this over 2022. No plans to switch to anything just yet but the work to make Wagtail compatible with multiple editors has already been done. There’d be more work needed to create an editor-agnostic way to create rich text editor customisations (at least for simple ones). Then / around the same time, we’d review different options, and most likely implement one as a third-party package before eventually moving it in core, and then having it be the default option.
I’m hoping we’ll get to wait until further browser standardisation (W3C Web Editing WG) before we need a replacement, but we’ll see.
@thibaudcolas Thank you for sharing your thoughts and considerations for the way forward!
I'm sure mentioning some of this also on the website and README will be very helpful, not least to show the project is still maintained despite the state of draft.js.
@thibaudcolas You're doing Gods work maintaining this project. By far and away the best editor I've seen for React.
Hello. Could you please update the README? It's a bit hidden here in the issue that the draft-js project is archived. Thank you.
If there's ever a discussion about a library. I'd recommend looking into TipTap. It's got a solid amount of momentum, with a large community base and is very customisable.
Which itself is built on ProseMirror https://tiptap.dev/guide/prosemirror
I'm not sure if these would replace Draftail or sit just under it to provide the basic framework for rich text. It's also got built in support for Code editing, and table editing. It would be a lot of work to change to this though.