我正在使用带有可拖动插件和
imageMove: true
选项的 Froala WYSIWYG 编辑器,因此我可以在编辑器中移动已经插入的图像。我也在使用 drop 事件,我想区分移动现有图像和将新图像插入编辑器。
froala.events.on('drop', event => {
const files = event.originalEvent.dataTransfer.files
const isImageMove = ??? // This should recognize if image was already inserted in the editor and now it was just moved.
console.log(isImageMove ? 'Image was moved' : 'Image was inserted')
})
有什么办法可以做到这一点吗?