2 回答

TA貢獻1804條經驗 獲得超2個贊
實際上,您使用的事件不正確。對于reactJs插件,它們具有onEditorChange。您可以按以下方式使用它
<Editor
apiKey="MyAPIKey"
initialValue=""
init={{
height: 500,
menubar: false,
plugins: [
'advlist autolink lists link image charmap print preview anchor',
'searchreplace visualblocks code fullscreen',
'insertdatetime media table paste code help wordcount'
],
toolbar:
'undo redo | formatselect | bold italic backcolor | \
alignleft aligncenter alignright alignjustify | \
bullist numlist outdent indent | removeformat | help'
}}
onEditorChange={this.onChange}
/>
然后您可以使用來訪問編輯器的內容
onChange = (content) => {
console.log(content);
}
e.target 不需要
添加回答
舉報