mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-12 15:46:29 +08:00
Move selection mark/cursor to end of markdown once done processing
This commit is contained in:
@@ -552,8 +552,8 @@ export const Text = forwardRef<ExtendedTextUtils, TextProps>((props, ref) => {
|
||||
}
|
||||
// markdown interception
|
||||
if (supportMarkdown && handleMarkdown(e)) {
|
||||
const start_selection = utils.current.getStartSelection();
|
||||
utils.current.setSelection(start_selection);
|
||||
const endOfMarkdown = utils.current.getEndSelection();
|
||||
utils.current.setSelection(endOfMarkdown);
|
||||
e.preventDefault();
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user