Documentation for addStorage method? #77
Unanswered
rastapopougros
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
is there some more documentation, or at least more examples with commented lines, to understand how to use the addStorage method and what to fill inside the markdown property ? Maybe it's directly a documentation from another lib used (like markdown-it or else) ?
It seems there is multiple usages possible for the sub key "serialize" (sometimes a function, sometimes properties), but what ?
And for the "parse" key, I don't understand at all what is possible (what is the "setup" sub-method and to do what inside, and then the "updateDOM" ?). And after parsing, is there a possibility to really create and use the node API of tiptap/prosemirror to modify the content, and not just updating an abstract DOM ?
Concretely I'm in my own Node extension, kind of "shortcode" (like in wordpress but another format), and I need to parse it from the plain markdown from the content in database, and create the appropriate Node of Tiptap, from the loading, or when I update the plain markdown (editor will be like wysiwyg+source MD, synchronized in both ways).
I already made an input detection to parse the shortcode while we type inside the Tiptap/Prosemirror editor (with "addInputRules")… but… I also need those shortcodes to be parsed and recognized (and transformed into the right Node !) from the markdown source directly…
Beta Was this translation helpful? Give feedback.
All reactions