flutter-quill icon indicating copy to clipboard operation
flutter-quill copied to clipboard

[Desktop] Image padding

Open jnet06 opened this issue 3 years ago • 3 comments

Hi, I am using Quill Editor and it works great so far. :)

I have a problem related to the Image upload feature. When I upload an image using the CameraButton I get a lot of padding around the image, that the generated image doesn't have.

Toolbar

QuillToolbar.basic(
  controller: _controller!,
  showDividers: true,
  toolbarIconAlignment: WrapAlignment.start,
  multiRowsDisplay: true,
  showFontSize: false,
  showImageButton: false,
  onImagePickCallback: uploadImage,
  filePickImpl: filePickImplementation,
)

Rich Field

 Expanded(
  child: Container(
    color: const Color(0xFFFFFFFF),
    child: Padding(
      padding: const EdgeInsets.all(12.0),
      child: Q.QuillEditor.basic(
        controller: _controller!,
        readOnly: false, // true for view only mode
      ),
    ),
  ),
),

As you can see in this image the "text" text, is just before the image start, the rest is all padding:

image

Would appreciate some help. Let me know if I can do anything else to reproduce the issue. Thanks!

jnet06 avatar May 22 '22 07:05 jnet06

I have realized that if in embeds/image.dart I change the center alignment for topLeft

image

The problem with the padding disappears. How can I that alignment on my own on the QuillEditor level?

Thanks!

jnet06 avatar May 22 '22 07:05 jnet06

The padding only works for mobile currently

singerdmx avatar Jul 21 '22 18:07 singerdmx

I am unsure how desktop works with it. Probably need a big change for it.

singerdmx avatar Jul 21 '22 18:07 singerdmx

Hi, I am using Quill Editor and it works great so far. :)

I have a problem related to the Image upload feature. When I upload an image using the CameraButton I get a lot of padding around the image, that the generated image doesn't have.

Toolbar

QuillToolbar.basic(
  controller: _controller!,
  showDividers: true,
  toolbarIconAlignment: WrapAlignment.start,
  multiRowsDisplay: true,
  showFontSize: false,
  showImageButton: false,
  onImagePickCallback: uploadImage,
  filePickImpl: filePickImplementation,
)

Rich Field

 Expanded(
  child: Container(
    color: const Color(0xFFFFFFFF),
    child: Padding(
      padding: const EdgeInsets.all(12.0),
      child: Q.QuillEditor.basic(
        controller: _controller!,
        readOnly: false, // true for view only mode
      ),
    ),
  ),
),

As you can see in this image the "text" text, is just before the image start, the rest is all padding:

image

Would appreciate some help. Let me know if I can do anything else to reproduce the issue. Thanks!

Recently we have added padding, alignment, and margin for the desktop as well

If you still facing any other issues or have any questions feel free to contact us on GitHub

EchoEllet avatar Oct 28 '23 02:10 EchoEllet