有沒有辦法在一個矩形中分隔我的文本框并為它們提供默認高度?我嘗試style在我<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>
</>
);
};
這是我的

它對我有用`
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/469206.html
標籤:javascript 反应 反应钩子 反应草稿所见即所得
下一篇:使用滾動只執行一次事件偵聽器
