Open fedjabosnic opened 1 month ago
@fedjabosnic Markdown is not supported by Tiptap. I can look into making editor compatible with html. For your current use case you can see html updates in LocalStorage (key: "html-content").
Would also love this feature as i want to store the content in my db as HTML or text
Describe the feature you'd like to request
I'd like to set initial content to
Markdown
orHtml
in string form, received over the wire. At present, the Novel Editor only allowsJSONContent
to be passed intoinitialContent
and there is no easy facility to convert. This makes it very hard to work with HTML and MD content directly, especially in string form..Describe the solution you'd like to see
Looking at the types in the core TipTap library, it seems that we can use the union type
Content
- or even define a union type ourselves. I'm not sure if there are some roadblocks in the codebase but this would allow us to pass any supported type of content to the editor...Additional information
My use-case is simple, I want to edit content coming from an api call that is either Markdown or Html, and at the moment I can't really get this running. Admittedly I'm not super experienced in Next, React or TipTap so please let me know if there is a decent solution already