Javascript 如何使ENTER在mathlive中工作,并在输入区域的Y方向中激活自动滚动?
我实现了Mathlive,如下所示:Javascript 如何使ENTER在mathlive中工作,并在输入区域的Y方向中激活自动滚动?,javascript,jquery,css,reactjs,Javascript,Jquery,Css,Reactjs,我实现了Mathlive,如下所示: componentDidMount(){ document.body.append(this.container); this.editor=window.MathLive.makeMathField(this.editorRef.current{ onKeystroke:(e,keyCode)=>{ 如果(键码==“[空格]”){ 这个.insertLatex(“\\,”); } } }) } .input{ 填充物:5px; 溢出:自动; 身高:18雷
componentDidMount(){
document.body.append(this.container);
this.editor=window.MathLive.makeMathField(this.editorRef.current{
onKeystroke:(e,keyCode)=>{
如果(键码==“[空格]”){
这个.insertLatex(“\\,”);
}
}
})
}
.input{
填充物:5px;
溢出:自动;
身高:18雷姆;
宽度:100%;
右边距:2em;
边框:1px实心#中交;
/*边框:1px实心#000*/
}
{this.state.initialLatex | |“#?”}
问题是,即使在使用多行和矩阵方法(也不稳定)实现ENTER后,只要在x轴或y轴的任何方向输入输入,我就无法保持自动滚动
任何关于此实施的想法都将有助于解决类似问题。让我也参与其中。