If you only want to insert things at the current position you can use this:
component.tinyMCE_editor.execCommand('mceInsertContent', false, "insert text");
If you want to do something with the cursor position that's going to be tricky, since the position in the editor doesn't correspond to the position in the content (the content has HTML tags in it). You can get the position this way:
component.tinyMCE_editor.selection.getBookmark().start
val.positionedOffset
is a function that returns an array, I'm not sure what you were using that for (not to mention that slice(0,x).length
= x)