-1

I am using ngx quill editor that enables use to paste image or add image via toolbar.My approach is am not using the bit 64, i upload the image to a server and returns to the input in my quill editor just URL if user upload an image. My issue now using quill-image-resize - npm that image cant be resized if I don't upload a new image to the server, issue is the plugin does not have an event after resizing image so can't re-upload.

Any better ways than my approach or should I just give up

novice in DotNet
  • 771
  • 1
  • 9
  • 21
buruguduys
  • 13
  • 7
  • If only i can add a handler just like the plugin quill drop and paste that has automatic handler i just need to add code. Thank for the help – buruguduys Jan 18 '21 at 09:47

1 Answers1

0

Yes. Capturing the resize event is possible. Cursor style value is always reset to "text" from nw-se cursors when resize event ends. Also tag name should be "IMG" otherwise selection changing will be captured.

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);
      }
    }
});
novice in DotNet
  • 771
  • 1
  • 9
  • 21