Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #1060946

    There is any way to keep multiple new line spaces.
    It is really frustrating to have to divide the paragraphs into many blocks

    es

    #1060952

    I don’t understand your question. What exactly would you like to get changed?
    Is it the Element Preview field you don’t like to have?
    Dashboard – Enfold (Child) – Layout Builder and check: “Disable advance layout builder preview in backend”

    Edit : now i see the movie – it took some time for the movie to start.

    #1060955

    Ok Is it the Element Preview field, but I meant that the multiple new line is removed after saving the text block.
    There is any way to keep multiple new line spaces?

    • This reply was modified 5 years, 9 months ago by differens.
    #1061007

    bump

    #1061090

    bump 2

    #1061108

    I don’t think you’re doing yourself a favor with a bump. This gives your theme a new timestamp and is therefore more recent. The mods I think work it off chronologically.
    Besides, it’s not an enfold problem. The wpautop function is WordPress own and the TinyMCE is a bit hard to be influenced there.
    I have already tried tinymce.init, but have not yet had any success.
    It’s up to you to use a <br class="noclear"> in the html editor field several times instead of <br>.

    #1061115

    With the wordpress 5 editor this does not happen. This is an enfold problem!
    I have already tried to disable all the plugins without success.

    I think also it’s unusual to have to use the HTML after buy a visual editor
    Thanks for the support

    #1061129

    the thing is the multiple br use.
    If you use in Visual Mode the shift and the return – you wil have one <br>
    If you use the Return without shift it wil end in a p-tag.

    #1061139

    I have try shift+Return in Visual Mode but nothing changes.
    Also if i add multple <p></p> or <br/> it is removed. :(

    I really appreciate your help

    #1061344

    these are the lines in formatting.php (WordPress File) to be responsible for multiple br replacement:
    line 476ff

    // Change multiple <br>s into two line breaks, which will turn into paragraphs.
    	$pee = preg_replace('|<br\s*/?>\s*<br\s*/?>|', "\n\n", $pee);

    what makes me wonder is that the old filter in functions.php child-theme:

    remove_filter( 'the_content', 'wpautop' );
    remove_filter( 'the_excerpt', 'wpautop' );

    seems not to work as it should.

    Even the filter tiny_mce_before_init i try to influence it via that filter

    add_filter( 'tiny_mce_before_init', 'change_mce_options' );
    function change_mce_options( $init ) {
    	$init['extended_valid_elements'] = '*[*]';
    	$init['remove_linebreaks'] = false; 
            $init['convert_newlines_to_brs'] = true; 
    	$init['remove_redundant_brs'] = false;
    	return $init;
    }

    no effect

    the edited textblock.php ALB Element with no wpautop stripslash : https://pastebin.com/M91L76av
    _________________
    A multiple <br> will always be tranformed to one p-tag

    #1065402

    so I have searched the internet in vain for a solution that WordPress does not automatically remove the multiple line breaks.

    Perhaps it is a combination of influences from both WordPress and Enfold settings that counteracts this. Here I think a developer has to take a look; my skills aren’t enough for that anymore.

    #1065887

    Hi,

    This is a known problem. I already tried to find a solution – but Kriesi and I finally rejected it because it could cause more problems with existing sites and break them.

    Removing the

    <br>

    happens already in js when clicking the save button and not in php – therefore the php filters won’t work.

    Probably the soloution from @guenni007 with

    <br class="noclear">

    is a good workaround.

    At the moment we do not have a stable working solution for that.


    @Guenni007
    Thanks for joining :)

    Best regards,
    Günter

    #1066168

    what you can do is to install a little plugin ( believe me manually adding custom buttons to the tinymce is hard stuff ) :
    https://wordpress.org/plugins/visual-editor-custom-buttons/
    you will then have the opportunity to add custom buttons to visual and text editor buttons.
    you then can create a new button (if you like with an own icon)

    everytime you press that button you will see that a linebreak is added – and will not be replace through WP

    #1066376

    Video
    ;)

    #1066513

    Hi,


    @guenni007
    Thanks for sharing this info.

    Best regards,
    Günter

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.