我想增加React quill文本框的内部文本大小,不是输出文本大小,而是文本编辑器的字体大小 在图像中,您可以看到不同的字体大小。看起来很奇怪 这是代码
"use client"
import React from 'react';
import ReactQuill from 'react-quill';
import 'react-quill/dist/quill.snow.css';
const TextEditor = ({ value, onChange }) => {
const toolbarOptions = [
['bold', 'italic', 'underline'],
['blockquote', 'code-block'],
[{ 'list': 'ordered' }, { 'list': 'bullet' }],
[{ 'header': [ 2, 3, false] }],
[{ 'script': 'sub' }, { 'script': 'super' }],
[{ 'align': [] }],
['clean']
];
return (
<ReactQuill
style={{ fontSize: '20px' }}
theme="snow"
value={value}
onChange={onChange}
modules={{
toolbar: toolbarOptions
}}
className="border-0 px-3 py-2 placeholder-gray-400 text-black bg-white rounded shadow focus:outline-none focus:ring w-full ease-linear transition-all duration-150"
/>
);
};
export default TextEditor;
在这里我尝试了基于文本的 text-lg 但没有任何改变
将此行添加到工具栏选项中
[{ size: ["small", false, "large", "huge"] }]