Try this:
1. MainForm -> Script, add this:
Ext.form.field.TextArea.prototype.insertAtCursor = function(txt) {
var val = this.value,
start = this.inputEl.dom.selectionStart,
end = this.inputEl.dom.selectionEnd;
this.setValue(val.substring(0, start) + txt + val.substring(end));
this.inputEl.dom.selectionStart = this.inputEl.dom.selectionEnd = start + 1;
Ext.defer(function() {
this.focus(false);
}, 10);
}
2. Use like this:
UniMemo1.JSInterface.JSCall('insertAtCursor', ['test']);