react-quill - ReactQuill 默认字体(无衬线、衬线和等宽)不起作用
问题描述
我有这个反应组件,我尝试更改文本的字体,但没有效果。
这是我的组件:
<ReactQuill
theme="snow"
value={value}
onChange={onChange}
modules={QuillEditorControlled.modules}
// formats={QuillEditorControlled.formats}
/>
这是我的模块 JSON:
{
toolbar: [
// [{ header: [1, 2, 3, 4, 5, 6, false] }],
[{ font: [] }], // fonts
[{ size: ["8px", "10px", "12px", "14px", "16px", "18px", "20px", "24px"] }], // custom dropdown
["bold", "italic", "underline", "strike", "clean"], // toggled buttons
[
{ list: "ordered" },
{ list: "bullet" },
{ indent: "-1" }, // outdent
{ indent: "+1" }, // indent
{ align: [] }, // text alignment
],
[
// { direction: "rtl" }, // text direction
{ script: "super" }, // superscript
{ script: "sub" }, //subscript
],
[
{ color: [] }, // font color
{ background: [] }, // font background color
],
["link", "image"],
],
}
这是组件的外观:
解决方案
推荐阅读
- javascript - 使用模板文字的动态 Vue 组件导入路径
- dart - 颤振没有运行
- java - Android:选中一个复选框会检查同一行中的所有复选框
- reactjs - Redux Form - 使用动态字段名称初始化状态
- android - 在 GradientDrawable Android 上设置描边
- python - 如何在 Django (Saleor) 中将“Chk”参数传递给 dotpay 支付网关
- node.js - 如何使用 Koa.JS 2 上传文件?
- python - 如何从python中的输入中获取方程
- google-cloud-platform - 谷歌云中的物联网数据
- sql-server - SQL Server Windows 用户身份验证