diff --git a/flutter_quill_extensions/lib/extensions/controller_ext.dart b/flutter_quill_extensions/lib/extensions/controller_ext.dart index 9ae00839..8346538a 100644 --- a/flutter_quill_extensions/lib/extensions/controller_ext.dart +++ b/flutter_quill_extensions/lib/extensions/controller_ext.dart @@ -24,7 +24,8 @@ extension QuillControllerExt on QuillController { length, BlockEmbed.image(imageSource), null, - ); + ) + ..moveCursorToPosition(index + 1); } /// Insert video embed block, it requires the [videoUrl] @@ -39,6 +40,7 @@ extension QuillControllerExt on QuillController { }) { this ..skipRequestKeyboard = true - ..replaceText(index, length, BlockEmbed.video(videoUrl), null); + ..replaceText(index, length, BlockEmbed.video(videoUrl), null) + ..moveCursorToPosition(index + 1); } }