@seafile/sdoc-editor 1.0.209 → 1.0.210
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -88,24 +88,6 @@ const withBlockquote = editor => {
|
|
|
88
88
|
});
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
91
|
-
|
|
92
|
-
// Merge with previous line when Select at the beginning of the line
|
|
93
|
-
if (currentLineIndex !== 0 && (0, _core.isSelectionAtBlockStart)(editor)) {
|
|
94
|
-
const lineText = _slate.Node.string(currentLineEntry[0]);
|
|
95
|
-
const previousNodeEntry = _slate.Editor.previous(editor, {
|
|
96
|
-
at: currentLineEntry[1]
|
|
97
|
-
});
|
|
98
|
-
if (!previousNodeEntry) return;
|
|
99
|
-
const focusPoint = _slate.Editor.end(newEditor, previousNodeEntry[1]);
|
|
100
|
-
_slate.Transforms.insertText(newEditor, lineText, {
|
|
101
|
-
at: _slate.Editor.end(newEditor, previousNodeEntry[1])
|
|
102
|
-
});
|
|
103
|
-
_slate.Transforms.removeNodes(editor, {
|
|
104
|
-
at: currentLineEntry[1]
|
|
105
|
-
});
|
|
106
|
-
(0, _core.focusEditor)(newEditor, focusPoint);
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
91
|
}
|
|
110
92
|
deleteBackward(unit);
|
|
111
93
|
};
|