flutter-quill
flutter-quill copied to clipboard
[Desktop] Image padding
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:

Would appreciate some help. Let me know if I can do anything else to reproduce the issue. Thanks!
I have realized that if in embeds/image.dart I change the center alignment for topLeft

The problem with the padding disappears. How can I that alignment on my own on the QuillEditor level?
Thanks!
The padding only works for mobile currently
I am unsure how desktop works with it. Probably need a big change for it.
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:
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