Cut and Paste (CMD+X -> CMD+P) does not restore pasted custom block with it's data
See original GitHub issueIssue
In our app we have lot’s of “Enrichments”. They can have several different types (eg. image
, audio
, …). Because of legacy reasons we cannot simply render a <img>
or <audio>
tag.
Nevertheless, I was able to register and add custom tools (with React support) for each enrichment type. BUT when one moves them with CMD+X and CMD+P they are added as a simple paragraph or when the block is detected without data.
FTR:
- I am not sure if the
pasteConfig
is correct, as I render adiv
with some other elements inside. Not sure what’s the correct pattern/tag then. - Not sure how to make sure
onPaste
receives existing data from the pasted block as well.
Expected outcome
I can copy and paste existing blocks with all it’s data within the Editor container.
Example
An example codesandbox can be found here: https://codesandbox.io/s/epic-feynman-myinj.
Environment
- React:
"react": "16.11.0"
- Editorjs:
"@editorjs/editorjs": "2.15.1"
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
How to Recover All Broken Blocks In One Command in ...
While logged into your WordPress site, edit the post that has the broken blocks. · Press CTRL + SHIFT + J on Windows...
Read more >Block Contains unexpected or invalid content. Attempt Block ...
There is no errors within the blocks as it does pull the data no issues. The HTML code is generated and I simply...
Read more >How to paste commands in command blocks - YouTube
How to paste commands in command blocks for the new Minecraft Bedrock Edition!Today we show you all how to pasta any command into...
Read more >Untitled
Vahan sewa fancy no, The alexander graham bell wetherspoons, Veneta cucine oyster ... Report text about animal cow, Custom chocolate bar wrappers canada?...
Read more >Propeller II - Page 33 — Parallax Forums
No one's mentioned this but the SD card booting scheme will fail because of multi block mode if ... Pointer points to raw...
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
Awesome, so far I can confirm it works. Thank you @neSpecc.
Resolved by #1060 Released in 2.17.0