|
@@ -9,9 +9,9 @@ const mdParser = new MarkdownIt()
|
|
|
const RighEditor = ({ value, onChange }) => {
|
|
|
const [cValue, setValue] = useState(value)
|
|
|
// 完成!
|
|
|
- function handleEditorChange({ text }) {
|
|
|
+ function handleEditorChange({ text, html }) {
|
|
|
setValue(text)
|
|
|
- onChange(text)
|
|
|
+ onChange(JSON.stringify(html))
|
|
|
}
|
|
|
return (
|
|
|
<MdEditor
|