feat: Double-link: Search interaction

This commit is contained in:
xiaodong zuo
2022-08-24 15:26:27 +08:00
parent 7d35303395
commit 9169421460
7 changed files with 77 additions and 68 deletions
@@ -713,7 +713,10 @@ class SlateUtils {
if (!this.editor) {
return undefined;
}
const { selectionEnd } = this.getSelectionStartAndEnd();
const selectionEnd = this.getSelectionStartAndEnd()?.selectionEnd;
if (!selectionEnd) {
return undefined;
}
return this.getStringBetween(this.getStart(), selectionEnd);
}