Closed BlindB0 closed 6 months ago
That should be possible. You just need to overwrite the charDataLoader
option to return the character data, however you decide to store it. Basically if you can write a function in JS that takes in a character string and returns the JSON data for that character then you're good to go. More details on the charDataLoader
option here: https://hanziwriter.org/docs.html#loading-character-data-link
@BlindB0 Did you manage to make it work in AnkiDroid? I'm trying the same also and for whatever reason it's not shown in AnkiDroid
To me it seems like we should be able to add all the json files to the Anki media folder and then read it from there, hopefully just like reading a file... But I'm not very experienced with Anki...
Hi @DzSom02 ! Yes, I can do it. AnkiDroid works totally offline with hanzi-writer. I can share my deck, so you can see how I made it.
@BlindB0 Yes! I think that would be very appreciated! Thank you!
https://file.io/bP6VsfOQWPvW Here my deck for hanzi. Archive inside you should unpack to anki media folder. I made it in desktop version and than sync it with ankidroid. But you can unpack it to ankidroid media folder on android phone. Check js code in cards for better understanding.
The deck https://github.com/krmanik/Anki-xiehanzi/ can be used as a reference as well.
Also, @BlindB0 should close this issue, since the problem has been solved.
Is the any way to make hanzi-writer totally offline? So, no https://cdn.jsdelivr.net/npm/hanzi-writer-data@2.0 at all, just read local JSON files in the same folder as hanzi-writer.html (with hanzi-writer script in it). Local webserver with JSON delivery also not possible. I try to make offline Anki deck (on android Ankidroid too) with hanzi-writer in it.