【发布时间】:2021-12-06 23:38:46
【问题描述】:
我在我的项目中使用 tinymce,但我不知道为什么我的文本区域会反向工作。方向性从右到左。但我想从左到右使用。我添加了方向性:“ltr”,但它不起作用。我能做些什么 ?我的错误在哪里?感谢帮助!我的代码:
<Editor
onChange={EditorDataUpdate}
apiKey="SOMEKEY"
onInit={(evt, editor) => (editorRef.current = editor)}
initialValue={editorData}
init={{
directionality: "ltr", //Still working like rtl
menubar: false,
plugins: [
"advlist autolink autosave link image lists charmap print preview hr anchor pagebreak",
"searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
"table contextmenu textcolor paste fullpage textcolor",
],
toolbar:
"undo redo | formatselect | " +
"bold italic backcolor | alignleft aligncenter " +
"alignright alignjustify | bullist numlist outdent indent | " +
"removeformat | help",
content_style:
"body { font-family:Helvetica,Arial,sans-serif; font-size:14px ;min-height:200px;}",
}}
/>
【问题讨论】:
标签: reactjs tinymce textarea tinymce-4 tinymce-5