I rewrote the template so that sessionStorage is always used for passing info from the front to the back of a card for Multiple-Choice questions. This should make them work on Anki Mobile. As a bonus, it allows creating Multiple-Choice questions with images as answer options and also makes multiple-choice work on Android even without the “type into card” setting.
The new version of the code is available here for testing:
Code for the front and back of the cards is contained in the respective .html
files (it is sufficient to replace only the JS part, starting from the first <script>
tag in the old template, as there were no changes to the layout). The styling is contained in the .css
file.
One of the styling updates should hide the on-screen keyboard now whenever its functionality is unavailable (like in the case of Anki Mobile), although I’m not sure if the used selector would work on iPhone. Tell me, how it goes