Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue of duplicated blocks upon pasting an image into the Slate E… #5818

Merged
merged 9 commits into from
Jun 19, 2024
1 change: 1 addition & 0 deletions packages/volto-slate/news/5818.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
When pasting an image into a Slate block, now only an image block is created, instead of both a Slate block and an image block. @aryan7081
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ export const onImageLoad = (editor, reader) => () => {
},
};

uploadContent(url, content, block).then((data) => {
const dlUrl = data.image.download;
insertImage(editor, dlUrl);
});
uploadContent(url, content, block);
};

export const withDeserializers = (editor) => {
Expand Down
Loading