I use antd+dva to do a background project. I use the rich text editor react-draft-wysiwyg, but the fonts available by default are all English fonts. How to add commonly used Chinese fonts?
trying to write fontFamily like this in a component has no effect.
import React from "react"
import {Editor} from" react-draft-wysiwyg"
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css"
import styles from". / Editor.less"
const DraftEditor = (props) = > {
return (< Editor
localization={{ locale: "zh" }}
toolbarClassName={styles.toolbar}
wrapperClassName={styles.wrapper}
editorClassName={styles.editor}
fontFamily={{"SimSun": "", "KaiTi": "",}}
{...props}
/>)
}
export default DraftEditor