in TinyMCE
I have initialised TinyMCE as follows. I want to force line breaks when user presses enter and not the paragraphs. I\'m trying following, but not working. I\'m using TinyMCE ve
I faced the same situation with TinyMCE 4. All my "Enter" (keyboard) resulted in a new  
injected.
I didn't want to use forced_root_block : false so I figured something out in the tinymce.init
function (each empty paragraph will be cleaned directly):
setup : function(editor) {
editor.on('PostProcess', function(ed) {
// we are cleaning empty paragraphs
ed.content = ed.content.replace(/( <\/p>)/gi,'
');
});
}
https://www.tinymce.com/docs/configure/integration-and-setup/#setup https://www.tinymce.com/docs/api/class/tinymce.editor/#postprocess