codex-team / codex-team/editor.js
[Bug] `Cannot read property 'updateCurrentInput' of undefined` when adding two instances of the editor
- Dominant language
- TypeScript
- Stars
- 31.9k
- Forks
- 2.2k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Describe a bug.
when I try to add 2 instances, the editor throws an error:
```
editorjs@latest:6 Uncaught TypeError: Cannot read property 'updateCurrentInput' of undefined
at y.value (editorjs@latest:6)
at k.value (editorjs@latest:6)
at HTMLDocument. (editorjs@latest:6)
```
Steps to reproduce:
1. add the EditorJS script
2. Add 2 divs with different ID (ex: `editor1` and `editor2`)
3. Initialize those divs with the editor
4. try clicking the (+) icon and adding some blocks
5. Check console
Expected behavior:
No errors when creating multiple instances
Screenshots:

Device, Browser, OS:
Windows 10, Chrome Version 88.0.4324.150 (Official Build) (64-bit)
Editor.js version:
Latest
Plugins you use with their versions:
No plugins, straight from the CDN
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.