codex-team / codex-team/editor.js
[Bug] Block Tutorial, Pasting Broken
- Dominant language
- TypeScript
- Stars
- 31.9k
- Forks
- 2.2k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
The tutorial appears broken in multiple places, this issue specifically about `onPaste`.
## Steps to reproduce:
https://editorjs.io/paste-substitutions
1. Do the Block Tutorial (creating SimpleImage) up to Chapter about `onPaste`
2. Paste a URL somewhere in the document
## Expected behavior:
An image should be embedded.
## Result:
How do I even debug a spew like this? Seriously :/
```
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'sanitizeConfig')
at eval (editor.js?7524:2:348698)
at Array.forEach ()
at o.get (editor.js?7524:2:348632)
at o.n. (editor.js?7524:2:7474)
at T.eval (editor.js?7524:2:175832)
at l (editor.js?7524:2:96860)
at Generator.eval [as _invoke] (editor.js?7524:2:96627)
at Generator.forEach.t. [as next] (editor.js?7524:2:97225)
at n (editor.js?7524:2:20859)
at s (editor.js?7524:2:21080)
at eval (editor.js?7524:2:21139)
at new Promise ()
at T.eval (editor.js?7524:2:21013)
at T.eval (editor.js?7524:2:176073)
at T.eval (editor.js?7524:2:169763)
at l (editor.js?7524:2:96860)
at Generator.eval [as _invoke] (editor.js?7524:2:96627)
at Generator.forEach.t. [as next] (editor.js?7524:2:97225)
at n (editor.js?7524:2:20859)
at s (editor.js?7524:2:21080)
at eval (editor.js?7524:2:21139)
at new Promise ()
at T.eval (editor.js?7524:2:21013)
at T.eval (editor.js?7524:2:170365)
at T.eval (editor.js?7524:2:169156)
at l (editor.js?7524:2:96860)
at Generator.eval [as _invoke] (editor.js?7524:2:96627)
at Generator.forEach.t. [as next] (editor.js?7524:2:97225)
at n (editor.js?7524:2:20859)
at s (editor.js?7524:2:21080)
at eval (editor.js?7524:2:21139)
at new Promise ()
at T.eval (editor.js?7524:2:21013)
at T.eval (editor.js?7524:2:169336)
at eval (editor.js?7524:2:167683)
at l (editor.js?7524:2:96860)
at Generator.eval [as _invoke] (editor.js?7524:2:96627)
at Generator.forEach.t. [as next] (editor.js?7524:2:97225)
at n (editor.js?7524:2:20859)
at s (editor.js?7524:2:21080)
at eval (editor.js?7524:2:21139)
at new Promise ()
at HTMLDivElement.eval (editor.js?7524:2:21013)
at HTMLDivElement.eval (editor.js?7524:2:167837)
```
## Device, Browser, OS:
- Firefox 98.0.2 (64-bit)
- Fedora Workstation 35 (Linux)
## Editor.js version:
`2.24.1` according to `save` output.
## Plugins you use with their versions:
**Not Applicable**
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.