Skip to content

Commit

Permalink
fix drop attachments
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexEbenrode committed Oct 2, 2024
1 parent db7275b commit fe00ed4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/VTextEditor/VTextEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,16 @@
event.dataTransfer.files &&
event.dataTransfer.files[0]
) {
const loaderFieldHeightInPx = 104;
isImageLoading.value = true;
const file = event.dataTransfer.files[0];
homework.sendImage(file).then(({ image }) => {
const { schema } = view.state;
const coordinates = view.posAtCoords({
left: event.clientX,
top: event.clientY,
top: event.clientY + loaderFieldHeightInPx,
});
if (coordinates) {
const node = schema.nodes.image.create({ src: image });
Expand Down

0 comments on commit fe00ed4

Please sign in to comment.