Skip to content
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

How content is rendered? #13

Open
Chandraprakash-Darji opened this issue Jul 3, 2024 · 1 comment
Open

How content is rendered? #13

Chandraprakash-Darji opened this issue Jul 3, 2024 · 1 comment

Comments

@Chandraprakash-Darji
Copy link

Chandraprakash-Darji commented Jul 3, 2024

I was going through the code. When you create the post you save the editor.getJSON() to the supabase.

But you directly rendering the JSON according to code

 <div className="relative mx-auto max-w-3xl border-slate-500/50 py-5">
      <div
            className="lg:prose-md prose"
           dangerouslySetInnerHTML={{ __html: post.content || "" }}
      />
</div>

How it is working?

@1337Impact
Copy link

i was wondering about the same thing. i save the content as text in db and when I load it, it shows as a big json object that has the same data of the post that I've created but with no parsing of formatting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants