Files
archived-linsa/web/shared/la-editor/lib/utils/index.ts
2024-10-07 12:44:17 +03:00

13 lines
398 B
TypeScript

import { Editor } from "@tiptap/core"
import { LAEditorProps } from "../../la-editor"
export function getOutput(editor: Editor, output: LAEditorProps["output"]) {
if (output === "html") return editor.getHTML()
if (output === "json") return editor.getJSON()
if (output === "text") return editor.getText()
return ""
}
export * from "./isCustomNodeSelected"
export * from "./isTextSelected"