I, too, got stuck on this until I tried it. Put at the end of your insert as in
document.execCommand('insertHTML', false, '<span> </span> ');
Just placing a space at the end of your HTML file will not work, since I found that it is always trimmed.
source share