How to force <br> line break in Firefox ContentEditable
问题 I have a JavaScript WYSIWYG editor (not unlike CKEditor) running on a site. It has a setting that makes IE create <br> line breaks when you press Enter in the editor. That works great, but unfortunately, Firefox (I've tested with 5 and 7) will still generate <p> elements, and generate <br> s only if you use Shift + Enter . Is there a way to make Firefox always generate <br> elements in a contentEditable? 回答1: From looking at the standards, it looks like this action is the way it is supposed