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 and draftjs-filters packages.
For draft-js-import-html (which uses another package draft-js-import-element) we needed some extra functionality, so we patched the package ourselves using patch-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 ago
draft-js itself is not really maintained anymore either. The last update was 2 years ago
- On top of that, Facebook is even working on a new rich text editor instead (see twitter.com/trueadm/status/1472377356044099587)
Long term we need to look for a replacement. I know that Slate is a strong contender, but there are others as well.
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-htmlanddraftjs-filterspackages.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-htmlis not really maintained anymore. The last update was 3 years agodraft-jsitself 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.