singerdmx / flutter-quill

Rich text editor for Flutter
https://pub.dev/packages/flutter_quill
MIT License
2.6k stars 840 forks source link

Inserted images in Quill Editor are treated as inline text, causing scrolling issues #2184

Open TuanFaied opened 2 months ago

TuanFaied commented 2 months ago

Is there an existing issue for this?

The question

Description: When inserting an image in the Quill Editor, the image is recognized as a line of text, but its height isn't accounted for in the scrolling behavior of the text field. This results in new text entered after the image not scrolling into view properly. The editor treats the image as a standard line without considering its actual dimensions, leading to text being hidden behind the image.

Expected Behavior: The editor should account for the image's height and scroll accordingly so that any new text entered after the image is visible and not hidden behind the image.

Actual Behavior: The editor scroll behavior treats the inserted image as a single line of text, disregarding the image's height. This causes the text typed after the image to be hidden behind it, and the scroll controller does not scroll down to accommodate the new text.

Video:

https://github.com/user-attachments/assets/930fc415-b826-43a1-aed0-fc4c47f6384d