@samhammer/tiptob 2.3.16 → 2.3.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7731,6 +7731,25 @@ function pd(n) {
7731
7731
  new be({
7732
7732
  key: new ge("imageUpload"),
7733
7733
  props: {
7734
+ handleDrop: (e, t, r, i) => {
7735
+ const o = t.dataTransfer && t.dataTransfer.files && t.dataTransfer.files.length;
7736
+ if (console.log(e, t, r, i), !o || i)
7737
+ return;
7738
+ const s = Array.from(t.dataTransfer.files).filter(
7739
+ (a) => a.type.includes("image/")
7740
+ );
7741
+ if (s.length === 0)
7742
+ return;
7743
+ t.preventDefault();
7744
+ const { schema: l } = e.state;
7745
+ for (const a of s)
7746
+ n(a).then((c) => {
7747
+ const u = l.nodes.imageUpload.create({
7748
+ src: c
7749
+ }), f = e.state.tr.insert(e.state.selection.from, u);
7750
+ e.dispatch(f);
7751
+ });
7752
+ },
7734
7753
  handlePaste: (e, t) => {
7735
7754
  if (!(t.clipboardData && t.clipboardData.files && t.clipboardData.files.length))
7736
7755
  return;