Skip to content

How to render JSON output from Rich-text-editor like (plate) in react js #2199

Closed Answered by 12joan
yadavmurari111 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, I converted your issue to a discussion since it doesn't seem to be a bug in Plate.

If what you want to do is initialize a Plate editor with a value from a JSON string, you can do that by parsing the JSON to a JS object and passing it to the initialValue prop of the Plate editor. Something like this:

<Plate
  ...
  initialValue={JSON.parse(data)}
/>

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@yadavmurari111
Comment options

@12joan
Comment options

@12joan
Comment options

@12joan
Comment options

@yadavmurari111
Comment options

Answer selected by yadavmurari111
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants
Converted from issue

This discussion was converted from issue #2198 on February 07, 2023 09:00.