-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Description
The problem I am facing
I let my users send newsletters to their audience (think Substack).
We store their custom rich text body as JSON and then when we want to send the email, we need to convert the message into HTML and text.
The solution I would like
I would like a function generateText that converts a JSON state to text.
This could be done in two ways:
- the function
generateTextlooks at nodes and converts them to text - we add a
toTextoption on every Node / Mark in the schema and call that in order to convert a node to text
Alternatives I have considered
I am not using TipTap yet, but I wrote my own wrapper around ProseMirror and created this file to serialize our JSON state to HTML / text — https://gist.github.com/vpontis/e5e373ea9950b413c18c867a5aedf352
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels