This is a repost of my answer on reddit from yesterday. I should have probably posted here directly.
This is a different problem from #3 so I create a new issue. I tested with the updated version from github (released on 2019-06-12) which includes the tiedid up model.py of commit 989b0a5. So my version should match the latest code from github.
The cloze button doesn't work for me. This still seems to call the built-in onCloze function: I ran anki from source with runanki with only your add-on installed and with a modified file editor.py which includes one print('original') line in the function onCloze. And I got this line in my terminal printed after I clicked the cloze button.
I searched the source code of other add-ons. As far as I see the only add-on for 2.1 that overwrites onCloze is "GODMODE: faster shortcuts and Cloze switching", https://ankiweb.net/shared/info/1508677152.
The only other add-on that affects saveNow seems to be "Import from Airtable", https://ankiweb.net/shared/info/428974728, which uses this line editor.Editor.saveNow = wrap(editor.Editor.saveNow, saveNow, "after"). This should work well with your add-on.
This is a repost of my answer on reddit from yesterday. I should have probably posted here directly.
This is a different problem from #3 so I create a new issue. I tested with the updated version from github (released on 2019-06-12) which includes the tiedid up
model.py
of commit 989b0a5. So my version should match the latest code from github.The cloze button doesn't work for me. This still seems to call the built-in
onCloze
function: I ran anki from source withrunanki
with only your add-on installed and with a modified fileeditor.py
which includes one print('original') line in the function onCloze. And I got this line in my terminal printed after I clicked the cloze button.I searched the source code of other add-ons. As far as I see the only add-on for 2.1 that overwrites
onCloze
is "GODMODE: faster shortcuts and Cloze switching", https://ankiweb.net/shared/info/1508677152.The only other add-on that affects
saveNow
seems to be "Import from Airtable", https://ankiweb.net/shared/info/428974728, which uses this lineeditor.Editor.saveNow = wrap(editor.Editor.saveNow, saveNow, "after")
. This should work well with your add-on.