Consider replacing Draft.js #10684
Labels
Elements: Text
P3
Nice to have
Package: Rich Text
/packages/rich-text
Type: Task
Tasks which do not involve engineering
Task Description
When we originally built the first version of text editing in the story editor, Draft.js was chosen for the job. At the time it was a proven and compelling rich text editor that fit our needs well.
For some extra functionality we also use the
draft-js-import-html
,draft-js-export-html
anddraftjs-filters
packages.For
draft-js-import-html
(which uses another packagedraft-js-import-element
) we needed some extra functionality, so we patched the package ourselves usingpatch-package
. See https://github.com/GoogleForCreators/web-stories-wp/blob/5e01de8e6ad44c633b24dcfbbb0867ff4960f212/patches/draft-js-import-element%2B1.4.0.patch.This patch has not been merged to this day. See sstur/draft-js-utils#155.
As made evident by #10597, our editor does not work without this patch. Patching does not work for packages that we want to publish to npm, so if we want to make it work there we need to fork the package. That works fine for the short term, but is not something we'd like to maintain permanently.
Unfortunately things don't look too bright:
draft-js-import-element
/draft-js-import-html
is not really maintained anymore. The last update was 3 years agodraft-js
itself is not really maintained anymore either. The last update was 2 years agoLong term we need to look for a replacement. I know that Slate is a strong contender, but there are others as well.
The text was updated successfully, but these errors were encountered: