mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-02 09:59:55 +08:00
feat: Double-link: In-line cursor handling, e.g., up, down, left,right, backspace keys
This commit is contained in:
@@ -405,11 +405,11 @@ Editor.before = function (
|
||||
if (element) {
|
||||
if (isInlineAndVoid(editor, element)) {
|
||||
// Inline entities need to be drilled out
|
||||
// target = Editor.before(editor, target);
|
||||
target = {
|
||||
path: [0, path[1] - 1],
|
||||
offset: 0,
|
||||
};
|
||||
target = Editor.before(editor, target);
|
||||
// target = {
|
||||
// path: [0, path[1] - 1],
|
||||
// offset: 0,
|
||||
// };
|
||||
} else if (editor.isInline(element) && !editor.isVoid(element)) {
|
||||
// Inline styles such as hyperlinks need to drill directly into it
|
||||
const inlineTextLength = element?.children?.[0]?.text?.length;
|
||||
|
||||
Reference in New Issue
Block a user