flutter-quill
flutter-quill copied to clipboard
Cursor position after adding image
String emojiImage =
'https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/${unifiedEmoji}.png';
final int index = insertQuillController!.selection.baseOffset;
final int length = insertQuillController!.selection.extentOffset - index;
insertQuillController!.replaceText(index, length, BlockEmbed.image(emojiImage), null);
Add image with image attribute, it is ok now, but after inserting image, the cursor position isn't correct position. it is showing earlier image inserted position.
for example
=>ABCDE[Cursor] =>ABCDE[AddedImage] =>ABCDE[Cursor][AddedImage]
after adding some text again, it shows cursor in correct position;
=>ABCDE[AddedImage]FG[Cursor]
How can I solve this issue?
Could you please kindly check it? Thank you
Originally posted by @youth-flutter-dev in https://github.com/singerdmx/flutter-quill/discussions/688#discussioncomment-2264932
Hello there, on behalf the Flutter Quill Team I would like to thank you for opening your first issue. Your inputs and insights are valuable in shaping a stable and reliable version for all our users. Thank you for being part of the open-source community!
same for video
how about this pr? https://github.com/singerdmx/flutter-quill/pull/1739