How to render JSON output from Rich-text-editor like (plate) in react js #2199
-
Description
Now ,I want to send this data to backend (using API) after that want to retrieve same data from backend to consume at frontend , this much I'm able to done. Sandbox https://codesandbox.io/s/github/udecode/plate-playground Expectation Environment
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
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 <Plate
...
initialValue={JSON.parse(data)}
/> |
Beta Was this translation helpful? Give feedback.
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: