-1

我正在使用 ngx 羽毛笔编辑器,它可以用来粘贴图像或通过工具栏添加图像。我的方法不是使用 64 位,我将图像上传到服务器并返回到我的羽毛笔编辑器中的输入,如果用户上传一个 URL图片。我现在使用quill-image-resize 的问题 -如果我不将新图像上传到服务器,则无法调整该图像的大小,问题是插件在调整图像大小后没有事件,因此无法重新上传。

比我的方法更好的方法还是我应该放弃

4

1 回答 1

0

是的。捕获调整大小事件是可能的。调整大小事件结束时,光标样式值始终从 nw-se 光标重置为“文本”。标记名称也应为“IMG”,否则将捕获选择更改。

quill.on('scroll-optimize',function(s,t){
    if(s.length>0)
    {

      if(window.getComputedStyle(s[0].target).cursor=='text' && s[0].target.tagName=='IMG')
      {
          console.log('resize event occurred:'+':width:'+s[0].target.width+':height:'+s[0].target.height);
      }
    }
});
于 2021-01-18T11:26:25.903 回答