我在我的 React 应用程序中使用 ace Editor 并收到上述错误。我想通过提交按钮触发的函数调用将我在 React 应用程序中使用的 Ace Editor IDE 的内容放入其中。
<AceEditor
ref='aceEditor'
height='100%'
width='100%'
mode={ideLanguage}
theme={ideTheme}
fontSize={ideFontSize}
showGutter={true}
showPrintMargin={false}/>
Run Code Online (Sandbox Code Playgroud)
这是按钮
<Button
type='button'
buttonStyle='btn--primary--normal'
buttonSize='btn--medium'
onClick={SendCode}
>SUBMIT</Button>
Run Code Online (Sandbox Code Playgroud)
这就是函数
const SendCode = () => {
console.log(this.refs.aceEditor.editor.getValue());
};
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么??