I want to set default values for Sun editor.
The default value I got from the database
I set the default value like this but it doesn't work.
<SunEditor autoFocus={true} onChange={handleEditorChange} setOptions={toolbarOptions} defaultValue={guide.description} />
Data in the database Enter image description here
Only this works
<SunEditor autoFocus={true} onChange={handleEditorChange} setOptions={toolbarOptions} defaultValue={"<p>The editor's default value</p>"} />
P粉8850351142023-09-09 09:53:46
Try the api function of react-sun-editor
<SunEditor autoFocus={true} onChange={handleEditorChange} setOptions={toolbarOptions} setContents={guide.description} />
Suneditor-react readme file link