I’m guessing you’re using the textInput object? First step would be to get the cursor position. If construct doesn’t provide an expression for that you can use js to get that since textInput is an html dom element.
Anyways you’d then use the len,left and right expressions to insert text.
Set text to left(textInput.text, pos)&"inserted"&right(textInput.text, len(textInput.text)-pos)