mirror of
https://github.com/linsa-io/linsa.git
synced 2026-01-12 12:20:23 +01:00
13 lines
398 B
TypeScript
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"
|