1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Lexical: Added auto links on enter/space

This commit is contained in:
Dan Brown
2024-12-14 12:35:13 +00:00
parent a8ef820443
commit 97b201f61f
4 changed files with 171 additions and 0 deletions

View File

@ -51,6 +51,10 @@ export function $getNodeFromSelection(selection: BaseSelection | null, matcher:
return null;
}
export function $getTextNodeFromSelection(selection: BaseSelection | null): TextNode|null {
return $getNodeFromSelection(selection, $isTextNode) as TextNode|null;
}
export function $selectionContainsTextFormat(selection: BaseSelection | null, format: TextFormatType): boolean {
if (!selection) {
return false;