import { useLexicalComposerContext } from "./LexicalComposerContext";
import { registerLexicalTextEntity } from "@lexical/text";
import { mergeRegister } from "@lexical/utils";
import { onCleanup } from "solid-js";
export function useLexicalTextEntity(getMatch, targetNode, createNode) {
    const [editor] = useLexicalComposerContext();
    onCleanup(mergeRegister(...registerLexicalTextEntity(editor, getMatch, targetNode, createNode)));
}
