import {$setBlocksType} from "@lexical/selection";
import {$getNearestNodeBlockParent, $getParentOfType, nodeHasAlignment} from "./nodes";
-import {CommonBlockAlignment} from "../nodes/_common";
+import {CommonBlockAlignment} from "lexical/nodes/common";
const lastSelectionByEditor = new WeakMap<LexicalEditor, BaseSelection|null>;
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;