我wana增加React羽毛笔文本框的内部文本sixe不是输出文本大小,但texteditor的字体大小Image of form在图像中,你可以看到不同的字体大小。它看起来很奇怪这是代码
"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,但没有任何变化
1条答案
按热度按时间pxy2qtax1#
在工具栏中添加此行选项
[{ size: ["small", false, "large", "huge"] }]