javascript - Mathquill - 使用 latex() 解析器后删除了 \MathQuillMathField 命令
问题描述
我\MathQuillMathField
通过 MathField 上的用户操作动态使用该命令
例子
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 对象中?
我的目标是允许在静态数学表达式中进行部分输入(例如让学生填写答案)
解决方案
推荐阅读
- c++ - 抽象基类中初始化const成员变量的常用解决方案
- python - 如何将函数放在不同的文件中,但只需一次导入即可获取它们?
- r - 合并 tibble 中两列的内容并将结果作为向量输出
- c - 这是C中“限制”的正确使用吗?
- c++ - 在向量 STL C++ 中查找项目
- reinforced-typings - ReinforcedTypings RtDictionaryType 替换
- javascript - 使用 mediarecorder API 播放真的很奇怪:不同的部分在不同的设备上丢失
- python-3.x - 要求用户输入直到正确
- php - PHP / Curl - file_get_contents / 检索本地内容时速度慢
- c# - 在真实设备 Xamarin 表单上获取请求