mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 20:38:52 +00:00
feat: repair paste cursor
This commit is contained in:
@@ -905,6 +905,19 @@ class SlateUtils {
|
||||
);
|
||||
}
|
||||
|
||||
public insertNodes(
|
||||
nodes: SlateNode | Array<SlateNode>,
|
||||
options?: Parameters<typeof Transforms.insertNodes>[2]
|
||||
) {
|
||||
Transforms.insertNodes(this.editor, nodes, {
|
||||
...options,
|
||||
});
|
||||
}
|
||||
|
||||
public getNodeByPath(path: Path) {
|
||||
Editor.node(this.editor, path);
|
||||
}
|
||||
|
||||
public getStartSelection() {
|
||||
return {
|
||||
anchor: this.getStart(),
|
||||
|
||||
Reference in New Issue
Block a user