-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTML to JSON? #1042
Comments
What about this? https://next.tiptap.dev/guide/output/#option-1-json |
I need this functionality on the server side.. |
Why not send the JSON over instead of HTML? Then no converting is necessary? |
I need it because i have api endpoint that accepts html from other sources, which can be later open and edited in the editor. Sure, i can make some workaround to temporary save html in the database, then open it on the front end and use front end to do the conversion and then update database again with the JSON, but i am not sure that is the right path. |
Hey guys, any updates regarding this one? Thank you in advance! |
+1 |
This is preventing me from going from Slate JS to this editor. I need to convert from HTML and back to it to store. |
A rough sketch to do this could be to use the ProseMirror DOMParser class along with a |
We’ve added a I’m closing this but I’m sure that we’ll rename the I’ll keep you updated! |
|
Same issue as @philippkuehn |
Make sure you are importing generateJSON from @tiptap/html, not @tiptap/core - that was my problem. |
Is your feature request related to a problem? Please describe.
I need functionality to convert html to the yDoc so that i can store it in the database, for later load in the editor.
Describe the solution you’d like
Like we have generateHTML() method from @tiptap/html package, i would like to have opposite function, say generateJSONFromHtml()
Maybe such functionality exists, but i am not able to find it.
Thank you!
The text was updated successfully, but these errors were encountered: