fix: shortcut for cut

This commit is contained in:
alt0
2022-10-11 17:10:38 +08:00
parent db44f619f2
commit c74b03da9a
4 changed files with 228 additions and 5 deletions
@@ -1138,6 +1138,15 @@ class SlateUtils {
});
}
public removeBetweenPoints(startPoint: Point, endPoint: Point) {
const at = {
anchor: startPoint,
focus: endPoint,
};
Transforms.select(this.editor, at);
this.editor.deleteFragment();
}
public setDoubleLinkSearchSlash(point: Point) {
const str = Editor.string(this.editor, {
anchor: this.getStart(),