我正在使用mathquill (马奇吉特),我试图使用html按钮创建一个键盘和一个后退空间,但我不知道如何移动光标,抛出公式。
谢谢,
发布于 2015-02-04 10:04:58
您可以在mathquill内的textarea上触发自定义的按键事件,以通过公式移动光标。
var customKeyDownEvent = $.Event('keydown');
customKeyDownEvent.bubbles = true;
customKeyDownEvent.cancelable =true;
customKeyDownEvent.charCode = 37; // 37 for left arrow key
customKeyDownEvent.keyCode = 37;
customKeyDownEvent.which = 37;
$('.mathquill-editable textarea').trigger(customKeyDownEvent);使用charCode / keyCode /这是:
谢谢。
https://stackoverflow.com/questions/27342276
复制相似问题