user961627 user961627 - 1 month ago 14
jQuery Question

force tinymce to enter newline with enter keypress rather than making a new paragraph

When a user hits the Enter key while using TinyMCE, it doesn't add a new line, it adds a new paragraph. Can I change this behavior and force it only to add a line break

<br />
instead of a new paragraph?

Answer

Oops the answer's right here: http://www.tinymce.com/wiki.php/Configuration:forced_root_block

tinyMCE.init({
    ...
    forced_root_block : 'p'
});