[Version 1.05 | 2016-01-31] Anki deck for kanji writing practice

Haha, I also came to this deck after giving skritter a try and being frustrated by it. I’m loving this so much and can already see how much writing helps with recognition and memorizing kanji. And I can’t imagine a more convenient way than this deck. Love it!

2 Likes

Thanks for editing this!!

Thanks for this awesome tool!

Quick question, how would one go about using this template to make Kana cards that make up two characters? I tried to make one for きゃ and it only shows the き portion of the kana.

nice, loving it. was thinking of learning to write, too, and i’m still lvl 7 - still easy to catch up to my wk level :slight_smile:

I’m getting HTML errors for some of the items.

1 Like

@Dschee, this is excellent. Thank you so much! It probably only means that the kanji writing practice app that I was working on in my (non-existent) spare time will never get finished. しょうがない!:relieved:

1 Like

Hey hey! First of all: thanks a bunch for making this deck, @cemmy410! It’s been a lifesaver and an everyday must. :two_hearts:
The only thing I’m missing is a radical version of the deck. I’ve searched for alternatives, but (assuming my search skills aren’t rusty) I haven’t found anything.
Do you have it in mind? Is it doable?

Thanks a lot for your time!!

Hi,
i’m getting errors on card without onyomi on the desktop Anki.
IMHA the way to fix this should be in the javascript function HtoK() that convert hiragana to katagana.
So search and replace in the template card :
// Run the function on the onYomi box
HtoK(“onYomi”);
by :
// Run the function on the onYomi box
if (document.getElementById(“onYomi”) != null ) HtoK(“onYomi”);

Other way is to paste the kunyomi in the onyomi in every card that shows the problem if you don’t feel easy with the template.

Hope it helps and thanks for the deck it’s really helpful.

1 Like

Thanks for the deck!

I just have one problem, how do I get the font to show the stroke order? I’m new to Anki, and I’m having a ton of trouble with getting that to work. Being a Mac user doesn’t help as well.

like this:

The app has been working great, except that I’m getting the error: “Invalid HTML on card: TypeError: Cannot read property ‘innerHTML’ of null”. Is there a fix for this on Mac?

@DD_Owl Here’s a fix for the “Invalid HTML on card: TypeError: Cannot read property ‘innerHTML’ of null” error:

Find the following chunk of code in the “Front Template” section of the card:

// Function to convert Hiragana to Katakana by subtracting 96
// from the Unicode character codes. Quick and dirty hack :D
  function HtoK(id) {
    hString = document.getElementById(id).innerHTML;
    kString = "";

    for (var i = 0, len = hString.length; i < len; i++) {
      theChar = hString.charCodeAt(i);

      // If character is Hiragana, add 96 to get its katakana equivalent
      if (theChar >= 12353 && theChar <= 12453) {
        theChar += 96;
      }

      kString = kString + String.fromCharCode(theChar);
    }

    document.getElementById(id).innerHTML = kString;
    return (0);
  }

Select it all and replace it with this:

// Function to convert Hiragana to Katakana by subtracting 96
// from the Unicode character codes. Quick and dirty hack :D
  function HtoK(id) {
    if (document.getElementById(id) != null ) {
    hString = document.getElementById(id).innerHTML;
    kString = "";

    for (var i = 0, len = hString.length; i < len; i++) {
      theChar = hString.charCodeAt(i);

      // If character is Hiragana, add 96 to get its katakana equivalent
      if (theChar >= 12353 && theChar <= 12453) {
        theChar += 96;
      }

      kString = kString + String.fromCharCode(theChar);
    }

    document.getElementById(id).innerHTML = kString;
    }
    return (0);
  }
4 Likes

@nashx90

I just edit the card and put a ‘-’ in the onyomi reading. There’s not that many cards that don’t work.

Aye, that’d do it too; I wasn’t sure how many cards were broken and was afraid of having to do it a whole bunch of times - if there aren’t many, though, then that’s a good workaround :+1:

1 Like

Thanks for this deck, it’s awesome.

I just have one question to make it perfect for my needs. Is there a way to hide the readings on the front side (maybe leave the pink and purple boxes empty) and reveal them only when clicking on show answer.
Maybe someone knows how?

Edit the card. Change “hideReadings” to true on the front side and paste this line on the back side right after the script tag:

document.getElementById(“Readings”).style.display = “inline”;

Should look like this:

Thank you for your reply. I tried it, but it doesn’t seem to work. The readings are still hidden after I click on show answer. Sometimes they appear for a split-second, before disappearing again.
Also, the greyed out answer kanji won’t appear anymore.

It looks like the forum software turned the double quotes in my response into “smart quotes,” which is crashing the JavaScript engine. Try deleting the quotation marks around Readings and inline and typing them back in manually.

Edit: or just copy this line, which should preserver the formatting:
document.getElementById("Readings").style.display = "inline";

Works like a charm now, thank you very much.

One small thing I noticed though. Since the readings are missing on the front, but not on the back, the whiteboard moves down a bit when showing the answer, meaning my writing doesn’t match up with the answer anymore. Any way to leave the pink and purple boxes on the front side empty and just hide the readings themselves? Or add empty pink and purple boxes to the front?

On the front template, change

document.getElementById("Readings").style.didplay = "none";

to

document.getElementById("Readings").style.visibility = "hidden";

On the back template, change

document.getElementById("Readings").style.display = "inline";

to

document.getElementById("Readings").style.visibility = "visible";