I have insert a line break within TinyMCE
tinyMCE.execCommand('mceInsertContent',false, "<br/>");
However the cursor currently stays where it was before.. which makes sense, however I would like code which moves the cursor the end of the html I just inserted?
Adding a space after the <br/>
will reposition the cursor:
So change:
tinyMCE.execCommand('mceInsertContent',false, "<br/>");
to
tinyMCE.execCommand('mceInsertContent',false, "<br/> ");
Example: http://codepen.io/anon/pen/PbKQpJ (demo links above editor)