Edit in JSFiddle

thaanaKeyboard.defaultKeyboard = 'phonetic';

tinymce.init({
    selector: "textarea",
    directionality: 'rtl', 
    setup: function (editor) {
        editor.on('keypress', function (e) {
            thaanaKeyboard.value = '';
            thaanaKeyboard.handleKey(e);
            editor.insertContent(thaanaKeyboard.value);
        });
    }
});
<textarea id="content"></textarea>