How can I insert an item at the cursor in a script?

@complexpoint Does TaskPaper make use of the strings returned from your JavaScript functions? Or is that just for debugging in Script Editor?