Add support for draft-js-plugins
See original GitHub issueIt’d be super rad if I could do
const renderer = {
plugins: [mentionsPlugin]
}
or something to that effect. That way I basically wouldn’t have to change anything about my setup between rendering a DraftJS plugins editor and redraft!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:7 (6 by maintainers)
Top Results From Across the Web
DraftJS Plugins - High quality plugins with great UX
Discussion and Support. Join the #draft-js-plugins channel after signing up to the DraftJS Slack organization or check out or collection of frequently asked ......
Read more >Draft.js Plugins - GitHub
Learn about why Draft.js and how to use DraftJS Plugins. In this talk Nik Graf explained the ContentState structure of a Draft.js Editor...
Read more >@draft-js-plugins/editor - npm
Start using @draft-js-plugins/editor in your project by running `npm i @draft-js-plugins/editor`. There are 49 other projects in the npm ...
Read more >draft-js-plugins-editor examples - CodeSandbox
Learn how to use draft-js-plugins-editor by viewing and forking example apps that make use of draft-js-plugins-editor on CodeSandbox. ; HellCatVN/get-help.
Read more >Overview | Draft.js
Draft.js allows you to build any type of rich text input, whether you're only looking to support a few inline text styles or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think redraft could actually handle these fairly well in core, because most of the plugins functionalities are really irrelevant for rendering. (they’re only used for editing experience changes)
The only thing redraft would need to handle is nested definitions of five methods:
decorators
customStyleMap
blockRendererMap
blockStyleFn
blockRendererFn
decorators
These are already handled fairly well, it would just need to be extended to handle an array of a mixture of normal and complex decorators. See #33.
customStyleMap
This is almost the same thing as redrafts
inline
option, that should just also support style objects: (maybe it already does?)blockRendererMap
This is almost the same thing as redrafts
blocks
option, that should just also support theblockRendererMap
notation:blockRendererFn
andblockStyleFn
are the only two I’m not sure how to handle since the provided methods might use the Immutable API under the hood, whichredraft
doesn’t ship. Any ideas for those?Went ahead and published the
blockRendererMap
support in 0.10.0 but this issue still needs some work.