Skip to content

Latest commit

 

History

History
executable file
·
20 lines (16 loc) · 630 Bytes

README.md

File metadata and controls

executable file
·
20 lines (16 loc) · 630 Bytes

Kana Data for Hanzi Writer

This is the hiragana and katakana data for Hanzi Writer. This data is based on the hiragana and katakana data from animCJK.

Usage

You'll need to use a custom charDataLoader function to use this data in Hanzi Writer.

HanziWriter.create('target-div', 'あ', {
  width: 400,
  height: 400,
  charDataLoader: (char, onLoad, onError) => {
    fetch(`https://cdn.jsdelivr.net/gh/ailectra/kana-json@v0.0.1/data/${char}.json`)
      .then(res => res.json())
      .then(onLoad)
      .catch(onError);
  }
})