-
-
Notifications
You must be signed in to change notification settings - Fork 980
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
Not able to set HTML in defaultValue
#223
Comments
I'm also hitting this - if you look at where the code sets the content, it's just calling |
Actually - found it. Novel uses the novel/packages/core/src/ui/editor/extensions/index.tsx Lines 137 to 140 in b4526fc
|
@steven-tey this error isnt solved yet |
As a workaround for this I'll add PR so you can configure/remove the Markdown extension |
Any update on this one? Does Novel have any other solution for this? |
+1 on this issue. This seems to be a very important feature missing which is supposed to be supported out of the box. I would suggest exposing lower level APIs from TipTap so we can hook into this directly. @andrewdoro |
+1 does anyone have a solution for passing html? Thanks |
this worked for me, I am able to set html by converting it to json. However, the style won't apply automatically
We need to handle these style using global attributes and create a custom extension as mentioned here below is an example i used to apply colors and passed it as an extension
|
@amang06 Did you have to add every possible HTML element to extensions? My concern is that if I miss something, it'll break the original html. I am using this as a wordpress post editor |
This is how I solved it. I store both HTML and JSON objects. |
Can you explain how it helps to store both the html and json? Say I load in html from a wordpress post, once I parse it into tiptap, I lose data. I can't really "recover" the missing data. |
Tiptap provided the api to convert html into tip-tap json. See here Uses
|
In tiptap,
setContent
can be used with HTML.But, in Novel, it renders as a string when I set
defaultValue
as HTML -<p>Hello</p>
.This code
renders this
Is there a workaround for this?
The text was updated successfully, but these errors were encountered: