-
Notifications
You must be signed in to change notification settings - Fork 991
Description
Summary
RenderEditor currently doesn’t support multiple selection boxes like RenderParagraph.getBoxesForSelection().
Developers need a way to access all selection boxes to properly render custom highlights, comments, or decorations when text spans multiple lines or blocks.
Expected Behavior
A method like:
List<TextBox> getBoxesForSelection(TextSelection selection);should return a list of TextBox objects for each segment of the selection.
This would allow precise drawing of highlights or overlays across lines and embedded blocks.
Actual Behavior
Only a single bounding box is available.
Selections spanning multiple lines or nodes can’t be accurately highlighted or decorated.
Example:
final boxes = renderEditor.getBoxesForSelection(selection); // Not availableNo public API provides these boxes currently.
Why It’s Needed
- Enables accurate multi-line highlight rendering (like Google Docs).
- Helps build annotation/comment UI with correct geometry.
- Improves selection UX consistency with Flutter’s native text engine (
RenderParagraph.getBoxesForSelection).
Environment
| Item | Version |
|---|---|
| Flutter Quill | ^11.4.2 |
| Flutter | 3.35.6 |
| Dart | 3.9.2 |
| Platform | Android / iOS / Web / Desktop |
Additional Context
This would make it easier to implement advanced text selection visuals and editing behaviors, especially for collaborative or document-style editors.