]> BookStack Code Mirror - bookstack/blobdiff - resources/js/wysiwyg/utils/selection.ts
added routes for zip export
[bookstack] / resources / js / wysiwyg / utils / selection.ts
index 28e729e92ae3ee8bca6691f895893d2b839cb691..167ab32adcae58f6e7c562c58471b0b6b758b1e4 100644 (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;