diff --git a/aqt/editor.py b/aqt/editor.py index 62bd2ae01..1b439093f 100644 --- a/aqt/editor.py +++ b/aqt/editor.py @@ -81,7 +81,7 @@ function sendState() { 'sub': document.queryCommandState("subscript"), 'col': document.queryCommandValue("forecolor") }; - py.run("state:" + JSON.stringify(r)); + pycmd("state:" + JSON.stringify(r)); }; function setFormat(cmd, arg, nosave) { @@ -100,7 +100,7 @@ function clearChangeTimer() { function onFocus(elem) { currentField = elem; - py.run("focus:" + currentField.id.substring(1)); + pycmd("focus:" + currentField.id.substring(1)); // don't adjust cursor on mouse clicks if (mouseDown) { return; } // do this twice so that there's no flicker on newer versions @@ -156,7 +156,7 @@ function saveField(type) { return; } // type is either 'blur' or 'key' - py.run(type + ":" + currentField.innerHTML); + pycmd(type + ":" + currentField.innerHTML); clearChangeTimer(); }; @@ -258,7 +258,7 @@ document.onclick = function (evt) {
- +