-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mobile support? #3
Comments
Mobile is not supported. There's actually no way for a way for addons to have true support for mobile because addons only run on desktop. The mobile apps are actually third-party implementations that can read the anki db but don't share the same codebase. The way addons "support" mobile is to use some rather nasty hacks like hardcoding the highlighting directly into your note's html or patching your card templates. The mobile app is just a plain webview; it doesn't know how to call into addon hooks like the desktop app can. So you're only left with this option. If you really want mobile you have to use one of the other (data-altering) highlighting addons. |
Totally get what you mean regarding the mobile apps being "third-party implementations", but I mean as you say they are just basically web pages. Why can't I just access the library from a CDN? So long as I have an internet connection, I don't need what's in |
Actually, seems support for loading external scripts on AnkiDroid is supported as of 2.15: ankidroid/Anki-Android#9098 (comment) |
The problem isn't how to access the js, it's how to insert it in the web view. Currently anki-code-highlight adds a hook, called by desktop anki right before the note html is displayed. It takes the note html as an argument, inserts a It's the desktop implementation that provides this intercepting mechanism. I don't know of any equivalent mechanism for mobile. |
I primarily use Anki on mobile, but I can't get the syntax to change for some reason. Specifically, I'm targeting the
base16/ros-pine
theme. On desktop it works, but I had to go through every card for the highlighting to change (something with Anki's cache?), but on mobile I just don't get anything. Before I spend a ton of time debugging it myself, can you confirm this supports mobile (iOS in my case)? Many thanks!The text was updated successfully, but these errors were encountered: