-
Notifications
You must be signed in to change notification settings - Fork 47
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
Rendering Content without RichTextReadOnly
#245
Comments
Hi @Jasermon, as mentioned in #136 (comment), For your particular extensions, which in general perhaps don't need any additional JS-based logic, you may be able to apply the mui-tiptap styles to your In general though, if you want your editor and your serialized content to render/look the same, you should let Tiptap do the rendering, which is what |
Thanks for your answer. I have no problem using |
@Jasermon Your concern is a user changing |
Describe the bug
I created my editor using CodeSandbox Repo as a reference. Everything works very well. My problem occurs when rendering the HTML code I receive with
getHTML()
.If I had to give an example, here is the post in editor;
When I render it with the following code it looks like this:
<Box dangerouslySetInnerHTML={{ __html: details.items.content }}
When I render it with
RichTextReadOnly
it looks like this:But I don't want to use
RichTextReadOnly
. I have several reasons for this:contenteditable="false"
is set totrue
, the content becomes editable.Expected behavior
A component that allows the content received with
getHTML()
orgetJSON()
to be rendered as in the editor can solve this problem.System (please complete the following information)
extensions
array used for the editorThe text was updated successfully, but these errors were encountered: