mirror of
https://github.com/linsa-io/linsa.git
synced 2026-01-12 12:20:23 +01:00
Move to TanStack Start from Next.js (#184)
This commit is contained in:
12
web/shared/la-editor/lib/utils/index.ts
Normal file
12
web/shared/la-editor/lib/utils/index.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
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"
|
||||
Reference in New Issue
Block a user