Jungwoo-An / react-editor-js

⚛️📝The unofficial editor-js component for React
https://codesandbox.io/s/react-editor-js-v2-34bfl
MIT License
940 stars 77 forks source link

Using multiple ReactEditorJS instances #219

Open ivid opened 1 year ago

ivid commented 1 year ago

Environment

Describe

If initializing multiple instances of ReactEditorJS, they may end up coalescing if they have the same holder ID. This can occur because code is currently relying on Date.now() to create a unique ID, which can sometimes return same value for multiple instances (likely due to reduced time precision).

This was previously already reported and fixed during v1, however it ended up regressing during rework to v2 (fix removed, pre-fix version added)