[Dart] Online Input Method - Pali (Pāli, Pāḷi)


Inspired by palipad (demo of palipad), I write a Dart webapp which help users input Pāli language online. The implementation is simple. Create an input:text element first, and then listen to the onKeyup event of the input:text element. The last two characters of the input:text element will be replaced according to the following rule.

Type For
AA Ā
aa ā
II Ī
ii ī
UU Ū
uu ū
"N
"n
.M
.m
~N Ñ
~n ñ
.T
.t
.D
.d
.N
.n
.L
.l

Demo (Fork me on Github)

Source Code for Demo (HTML):

Source Code for Demo (Dart):


References:

[1]events - Respond immediately to textarea changes in Dart - Stack Overflow
[2]dart:core.String API Docs
[3]dart - Use static variable in function() - Stack Overflow
[4]javascript - Get cursor position (in characters) within a text Input field - Stack Overflow
[5]dart - TextArea cursor position - Stack Overflow
[6]dart - caret position in an editable div (dartlang) - Stack Overflow
[7]selection - Setting and getting selectionrange/caret position in contenteditable div element (dart) - Stack Overflow
[8]Pāli Input Method on Ubuntu Linux
[9][Golang] Online Input Method (Pāli) by GopherJS