I am making a simple app that makes a JSON form and I have already included the basic details and employment details as two sections.
Basic details section has two inputs such as First Name and Last Name.
Now I am given the requirement to implement the Profile Summary control that should be a text editor and the values entered needs to be stored in JSON format.
Please look at the JSON format in the given codesandbox link.
File that forms JSON: https://codesandbox.io/s/nextjs-css-only-carousel-forked-8grpo?file=/components/form_context.js
{
basicDetails: {
firstName: "",
lastName: "",
profileSummary: "" --------> This is where I need to fetch the text editor entered values
},
companyDetails: [
{
companyName: "",
designation: "",
startDate: ""
}
]
}
Text Editor file: https://codesandbox.io/s/nextjs-css-only-carousel-forked-8grpo?file=/components/text_editor.js
Requirement:
The requirement is that the text editor value needs to be stored inside the JSON format.
Eg: If the the text is made bold
or bullet list
in the editor then the value of the key profileSummary
needs to be added with respective tags.
I am trying to achieve the text editor field value like here: https://www.ippy.io/
As I am trying to build a resume like structure, Unable to get the point of how should I need to make the text editor value into JSON key profileSummary
.
Complete working example:
https://codesandbox.io/s/nextjs-css-only-carousel-forked-8grpo
Any help is much appreciated.