Manuel Bustillo 97d47b339a
Some checks failed
Check usage of free licenses / build-static-assets (pull_request) Successful in 48s
Add copyright notice / copyright_notice (pull_request) Successful in 1m56s
Build Nginx-based docker image / build-static-assets (push) Successful in 7m30s
Playwright Tests / test (pull_request) Failing after 10m28s
Add copyright notice
2025-06-08 18:04:42 +00:00

22 lines
546 B
TypeScript

/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/
'use client'
import { useEditor, EditorContent } from '@tiptap/react'
import StarterKit from '@tiptap/starter-kit'
const Tiptap = ({ content, onUpdate }: { content: string, onUpdate: (newContent:string) => void }) => {
const editor = useEditor({
extensions: [StarterKit],
content: content || '<p>Type something here...</p>',
onUpdate({ editor }) {
onUpdate(editor.getHTML());
},
})
return <EditorContent editor={editor} />
}
export default Tiptap