UNPKG
jszhuyin
Version:
latest (1.1.2)
1.1.2
1.1.1
1.1.0
1.0.1
1.0.0
Smart Chinese Zhuyin Input Method in JavaScript.
github.com/timdream/jszhuyin
timdream/jszhuyin
jszhuyin
/
tonic-example.js
12 lines
(9 loc)
•
281 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
const
{
JSZhuyin
} =
require
(
'jszhuyin'
);
var
jszhuyin =
new
JSZhuyin
(); jszhuyin.
load
();
var
candidates = []; jszhuyin.
oncandidateschange
=
function
(
c
) { candidates = c; }; jszhuyin.
handleKey
(
'ㄐㄊㄌㄞˊㄒㄧㄝˇㄓㄨˋㄧㄣㄕㄖㄈ'
);
console
.
log
(candidates[
0
][
0
]);