Tiptap Rich Text Editor data validation (alternatives welcome)

Hi. I'm using TipTap to provide a rich text editor for my app. Has anyone ever validated the data going into / out of tiptap? I'm not sure how to write a zod parser for it or if theres a more reasonable way to check the data.
2 Replies
whatplan
whatplan2y ago
maybe react-hook-form's controller? https://react-hook-form.com/api/usecontroller/controller/ check out julius' zod wrapper for this as well: https://github.com/juliusmarminge/t3-complete/blob/main/src/utils/zod-form.ts input validation would be hard, but react-hook-form could help you monitor when the text has been edited, zod validate its output on submit, and reset its contents.
Controller
Performant, flexible and extensible forms with easy-to-use validation.
GitHub
t3-complete/zod-form.ts at main · juliusmarminge/t3-complete
Contribute to juliusmarminge/t3-complete development by creating an account on GitHub.
Tom
Tom2y ago
i know about rhf / zod. the problem is that i dont have a validator for all the things that are acceptable by tiptap
Want results from more Discord servers?
Add your server