Closed gyang55 closed 1 month ago
try to change the index on the custom image handler.
function imageHandler(imageDataUrl, type, imageData) {
// ...
let index = (quill.getSelection() || {}).index
if (index === undefined || index < 0) index = quill.getLength()
quill.insertEmbed(index, 'image', res.data.image_url, 'user')
}
When I dropped a first pic, it is fine. But when I want to drop a second pic after the first one, it was always dropped before the first pic and cannot be dropped after it.