Added support for specifying cursor location in template

Can now have the cursor put inside of the replaced content after insertion of the replacement. E.g. inside of the loop body.