[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 ā
ii ī
uu ū
~N Ñ
~n ñ

Demo (Fork me on Github)

Source Code for Demo (HTML):

Source Code for Demo (Dart):


[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