codex-team / codex-team/editor.js
Plugin without input focus error
- Dominant language
- TypeScript
- Stars
- 31.9k
- Forks
- 2.2k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Hey! so I'm trying to implement some plugins that are vue components and I have an issue where if the editor's first block is one of these plugins, if the plugin doesn't have an input (or at least that's my logical conclusion) it renders an error when it loads
```
Editor.js is not ready because of TypeError: Cannot set properties of undefined (setting 'focused')
```
this seems to happen in this function when setting focused to true
```
highlightCurrentNode() {
this.clearFocused(), this.currentBlock.focused = true;
}
```
I created this public demo repo for illustration if needed:
https://github.com/andrei4002/editorjs-test
after running, try to add the DummyPlugin in the editor (make sure it's the first block), hit save and reload the page, and when it loads the data, the error should pop up in the console
Device, Browser, OS:
Chrome (latest)
Editor.js version:
2.28
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.