insertBrOnReturn
is a Mozilla specific command, Chrome doesn't support it. You can test that with:
document.queryCommandSupported('insertBrOnReturn')
jsFiddle here, it alert true
in Firefox, but false
in Chrome.
If you want to insert <br>
only, try:
document.execCommand('insertHTML', false, '<br><br>');
Also, check this: Prevent contenteditable adding <div> on ENTER - Chrome