◄ ► | Edit | Home | Admin | en de fr et | Sign in

#6274 (Resize images in the Quill editor)

by Luc Saffre · in Developers · assigned to Sharif Mehedi

Summary

Children

Comments

  • 1 year, 1 month ago by Luc Saffre about #6274 (Resize images in the Quill editor) : TODO in Python: extend sanitize() so that it analyzes img tags and modifies them: replace absolute values in sizes (max-width, width, height, max-height...) using a converter: ASSUMED_SCREEN_WIDTH = 1200 "400px" -> 30% ASSUMED_EM_WIDTH = 10 "400px" -> 40em
  • 1 year, 1 month ago by Luc Saffre about #6274 (Resize images in the Quill editor) : When I resized an image and the handles are still visible, and then I hit Ctrl+S: this is then taken by the browser but it should go to Lino.
  • 1 year, 1 month ago by Luc Saffre about #6274 (Resize images in the Quill editor) : It's working fine now, but one piece is missing: we don't want absolute sizes. We shiuld sanitize sizes in pt ot px to em or %
  • 1 year, 1 month ago by Luc Saffre about #6274 (Resize images in the Quill editor) : There is a doctest failure in docs/specs/delayed_values.rst which looks like a part of this ticket.
  • 1 year, 1 month ago by Sharif Mehedi about #6274 (Resize images in the Quill editor) : I have published some changes related to this ticket on projects, lino, xl, react, cms & book.
  • 1 year, 1 month ago by Sharif Mehedi about #6274 (Resize images in the Quill editor) : We have some demo fixtures that uses [file id <formats>] stuff. Not sure how to convert them to the new implementation.
  • 1 year, 1 month ago by Luc Saffre about #6274 (Resize images in the Quill editor) : My first idea was wrong. We leave the memo command but replace the syntax so that it keeps the style, class and title attributes.
  • 1 year, 1 month ago by Luc Saffre in reply to Luc Saffre about #6274 (Resize images in the Quill editor) : More precisely the on_sanitize() function in lino.modlib.uploads, when src.startswith("data:image"), wouldn't say tag.replace_with(f'[file {upload.pk}]') but would say tag['src'] = upload.get_media_file().get_image_url().
  • 1 year, 1 month ago by Luc Saffre about #6274 (Resize images in the Quill editor) (1 reply) : Rather than inserting a file memo command, maybe we can leave the image tag and just modify the value of its src.
  • 1 year, 1 month ago by Sharif Mehedi about #6274 (Resize images in the Quill editor) : The image resize works somewhat expected. But the result of the resize is not persistent since the image is turned into a memo command by the backend.
  • 1 year, 1 month ago by Luc Saffre about #6274 (Resize images in the Quill editor) : @8lurry guided me on Jitsi to install and use the quill-resize-image module, but it raises a TypeError: "can't access property "imports", window.Quill is undefined". We tried a few things but without success. @8lurry will restart from scratch asap and try to get it work.
  • 1 year, 2 months ago by Luc Saffre in reply to Luc Saffre about #6274 (Resize images in the Quill editor) : More precisely I'm not very sure about what I want. Yes, I want handles to resize the image. But I don't necessarily want it to automatically reduce the quality. Though an optional resize (e.g. a pop-up dialog when I double-click the image) would be nice. And the position is actually not the busines...
  • 1 year, 2 months ago by Luc Saffre about #6274 (Resize images in the Quill editor) (1 reply) : I think that this plugin does what i want.
  • 1 year, 2 months ago by Luc Saffre about #6274 (Resize images in the Quill editor) : Created new Ticket #6274 (Can I resize and position images in the Quill editor?).