是否有一种方法可以在矩形中分隔我的文本框并给出它们的默认高度?我尝试在我的<Editor />中使用<Editor />,但它不起作用。
import { Editor } from "react-draft-wysiwyg";
import { EditorState } from "draft-js";
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
const TabContent = ({ name, typeProof }) => {
const [text, setText] = useState(
() => EditorState.createEmpty(),);
return (
<>
<SafeAreaView>
<Editor
editorState={text}
onEditorStateChange={setText}
wrapperClassName="wrapperClassName"
editorClassName="editorClassName"
toolbarClassName="toolbarClassName"
placeholder="Enter your text here:"
style={{
height: 200,
margin: 12,
borderWidth: 0.5,
padding: 10,
borderRadius: "2px"
}}
toolbar={{
options: ['inline', 'blockType', 'fontSize', 'fontFamily', 'list', 'textAlign', 'colorPicker', 'embedded', 'remove', 'history'],
...
}}
/>
</SafeAreaView>
</>
);
}; 我的代码
发布于 2022-05-01 13:55:06
也许你需要用
EditorStyle={高度: 200,边距: 12,borderWidth: 0.5,填充: 10,borderRadius:"2px“}}
属性,而不是样式。


这对我来说很管用
https://stackoverflow.com/questions/72077179
复制相似问题