insert line break instead of <p> in TinyMCE

add line breaks online
insert line break in word
wordpress line break shortcode
line break code
insert line break in excel formula
confluence line break
line break in excel mac
insert line break html

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 version 3_3_8.

tinyMCE.init({
        mode: "exact",
        theme: "advanced",
        elements: "textAreaId",
        cleanup: false,
        theme_advanced_toolbar_location: "",
        theme_advanced_buttons1: "",
        theme_advanced_buttons2: "",
        theme_advanced_buttons3: "",
        height: 200,
        width: 300,
    forced_root_block : false,
    force_br_newlines : true,
    force_p_newlines : false,
        oninit: InitPosition
    }); //init ends

I tried to define forced_root_block : "", but still it is not working.

What am I doing wrong?


Simply add forced_root_block : false

Or if you want a wrapper: forced_root_block : 'div',

Works like a charm!

Make a line break instead of a paragraph » WordPress , WordPress automatically converts line breaks into paragraphs so you don't need to write HTML code. To make a line break instead, press the following keys on 


Instead try:

force_p_newlines : false,
force_br_newlines : true,
convert_newlines_to_brs : false,
remove_linebreaks : true,    

Solved: how do I insert a line break instead of a paragrap, I enter each link on a new line, but this creates a paragraph <p> in the wiki content. I prefer to have simple line breaks using <br/>. I see no way to accomplish this.


What worked for me was:

tinymce.init({
    ...
    force_br_newlines : true,
    force_p_newlines : false,
    forced_root_block : ''
});

Each linebreak is producing br tag with these settings.

SOURCE: http://www.tinymce.com/wiki.php/Configuration3x:force_br_newlines

How do I insert a hard return (line break)?, Instead, place the blinking cursor in the second paragraph, go to Format > Space Before and choose the number of blank lines that will be inserted above the 


I faced the same situation with TinyMCE 4. All my "Enter" (keyboard) resulted in a new <p>&nbsp</p> 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>&nbsp;<\/p>)/gi,'<br />');
            });

        }

https://www.tinymce.com/docs/configure/integration-and-setup/#setup https://www.tinymce.com/docs/api/class/tinymce.editor/#postprocess

Insert a line break in a cell - Office Support, To add space between lines of text in a cell, double-click the cell, click where you want to break the line, and then press ALT+ENTER as many times as you 


The "forced_root_block : false" option works fine for TinyMCE 4.0.

How to Insert Line Break in Excel (Quick and Easy), in the same cell. Here is a trick to insert Line Breaks in Excel Formulas. You can also use the CONCAT formula instead of using the ampersand (&) symbol:


Injecting a Line Break, Rather than a <span> , we could use a <div> , and we'll get that break just by virtue of the div being a #You can insert line breaks via pseudo element. It's easy 


Paragraphs and Line Breaks, In this article we will go over the difference between a paragraph and a line break and how to insert each one. Paragraphs - Press Enter. Paragraphs in the 


How can I insert a line break over 100 times for a given text string , But after clicking through the import guide the data is imported in columns rather than rows. So each e-mail address gets its' own cell in the first row. There is no