Open jelleroorda opened 2 years ago
Hi @jelleroorda thank you very much!
That's actually a very nice touch. I'd have to research and play around a bit to see how that would become possible in code. In the meantime, let me know if you already have any insight on how to implement this
Hey @sereneinserenade!
Your extension is very useful. I'm learning how to create extension for Tiptap, and my main goal is "merging" your Extension with coolswitch extension for Drag And Drop and upload support, in case of images I mean. I'm rushing about it and try to understand how to do that, but both logics, at least for me, are uneven. Would you mind putting in the right direction to do this? This process would be end in a PR for the extension.
Thanks in advanced if any help is available.
hey, @mrcego
I've already made a
pasteDropPlugin
for it. here's a linkhope that helps
I have implemented the plugin, but I'm facing two issues now:
The uploaded image is not being shown in the editor. The weird thing here is, log is showing image in the object from editor. And when save code in the VSCode, image is shown, so, reactivity issue here??
Position menu from uploaded image when I hover it is not shown, probably because is not wrapped into ResizableMediaNodeView.vue
component as article tag.
Could I sharing with you a repro link, if you have time to check it?
For the drag and drop functionality, I added the data-drag-handle
attribute to the img
element to make it work :
<img
v-if="mediaType === 'img'"
v-bind="node.attrs"
ref="resizableImg"
class="rounded-lg"
:class="[`${isFloat && `float-${props.node.attrs.dataFloat}` || ''}`, `${isAlign && `align-${props.node.attrs.dataAlign}` || ''}`]"
draggable="true"
data-drag-handle
>
Hey @sereneinserenade, great work!
I'm just leaving a feature request here after checking out the demo. It would be great if it were possible to drag and drop media to other places in the text. For example, when you add an image and then float it left. It would be great if you could drag it in front of some text so the text would go around the image.