I've tried several different ways to insert text at current cursor position but there are two major problems. First there is no possibility to get the current cursor position. On iOS there is a possibility to track this position with change and selected events but this is rather defective. Second problem is that (if you've inserted at correct position) the cursor will be set to the end of the text on iOS (I didn't tried on Android.
Usecase: In some kind of Twitter Application i wanna provide a '#' and a '@' button for faster writing a message.