mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 17:46:18 +08:00
Merge pull request #468 from lynettelopez/fix/move-cursor-to-end-of-markdown
Fix: Move cursor to end of markdown
This commit is contained in:
@@ -551,9 +551,9 @@ 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);
|
||||
if (supportMarkdown && handleMarkdown(e)) {
|
||||
const endOfMarkdown = utils.current.getEndSelection();
|
||||
utils.current.setSelection(endOfMarkdown);
|
||||
e.preventDefault();
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user