Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Mathquill-\MathQuillMathField命令在使用latex()解析器后被删除_Javascript_Mathquill - Fatal编程技术网

Javascript Mathquill-\MathQuillMathField命令在使用latex()解析器后被删除

Javascript Mathquill-\MathQuillMathField命令在使用latex()解析器后被删除,javascript,mathquill,Javascript,Mathquill,我通过用户在MathField上的操作动态使用\MathQuillMathField命令 范例 mathFieldSpan = document.getElementById('math-field'); fillInTheBlank = document.getElementById('fill-in-the-blank') mathField = MQ.MathField(mathFieldSpan); fillInTheBlank = MQ.StaticMath(document.getE

我通过用户在MathField上的操作动态使用
\MathQuillMathField
命令

范例

mathFieldSpan = document.getElementById('math-field');
fillInTheBlank = document.getElementById('fill-in-the-blank')
mathField = MQ.MathField(mathFieldSpan);
fillInTheBlank = MQ.StaticMath(document.getElementById('fill-in-the-blank'));

//add new input field with ```\MathQuillMathField``` command to the mathField object.
function mathFieldBtn() {
  mathField.write('\\MathQuillMathField{}');
}

//display the received math input in static mathQuill element - fillInTheBlank
function save() {
  fillInTheBlank.latex(mathField.latex());
}

但是
\MathQuillMathField
在运行
mathField.latex()
方法后被删除

如何动态保存空字段(
\MathQuillMathField
)并在staticMath对象中显示它

我的目标是在静态数学表达式中允许部分输入(例如,让学生填写答案)