Multiple draftjs editors cannot be used on the same page using plugins
See original GitHub issueMultiple draftjs editors cannot be used on the same page using plugins. All interactions are sent to the last instance on the page.
Clone the repo, install dependencies and change line 77 in /stories/index.js
from
.add('CustomToolbarEditor', () => <CustomToolbarEditor />)
to
.add('CustomToolbarEditor', () => <div><CustomToolbarEditor /><CustomToolbarEditor /></div>)
Now run yarn storybook
and open the correct example
Test functionality of both editors and you will see the controls misbehave and target the last editor.
A similar issue is https://github.com/draft-js-plugins/draft-js-plugins/issues/548
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:19 (2 by maintainers)
Top Results From Across the Web
Multiple draft-js-plugins editors on the same page don't work
Each editor get's its own plugins. You can solve this issue ether by creating different plugin for each editor instance and pass them...
Read more >Issues and Pitfalls - Draft.js
This article addresses some known issues with the Draft editor framework, as well as some common pitfalls that we have encountered while ...
Read more >Building a Rich Text Editor with React and Draft.js, Pt. 2.2
In this post, I will review how to build both a key command and button to embed hyperlinks within your text editor using...
Read more >draft-js-styletoprops-plugin - npm
Cusotom styles to props plugin for DraftJS Plugins Editor. ... having to use multiple 3rd-party plugins to build the most simple functions ...
Read more >Getting started with draft.js - React Rocket
Draft.js is a powerful framework for creating text based editors. ... started with draft.js (current); Getting started with draft.js plugins ...
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
Thank you, I have converted it to something similar with
useState
. With this, each editor get’s its own plugins.This is really an issue for me. Any suggestions or workarounds?