Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursor position after adding image #1554

Open
rakib205 opened this issue Nov 26, 2023 · 3 comments
Open

Cursor position after adding image #1554

rakib205 opened this issue Nov 26, 2023 · 3 comments

Comments

@rakib205
Copy link

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 #688 (comment)

@singerdmx
Copy link
Owner

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!

@rakib205
Copy link
Author

same for video

@kiwamizamurai
Copy link
Contributor

how about this pr?
#1739

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants