Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #196742

    I’ve been running into a very frustrating issue where, often times, when I save a text block, extra line breaks are inserted between paragraphs. It seems I have to manually remove the line breaks from the html side of the editor in order to resolve the issue. This can be time consuming on a long text block, and difficult for the client to deal with if they’re updating the site themselves. Are you familiar with this issue?

    Thanks!

    #196889

    Hi sky19er!

    You can disable the wpautop using this http://dev.wp-plugins.org/wiki/TextControl. You can disable it manually, edit config-templatebuilder > avia-shortcodes > textblock.php, find this code on line 61:

    $params['innerHtml'] = "<div class='avia_textblock avia_textblock_style' data-update_with='content'>".stripslashes(wpautop(trim(html_entity_decode( $params['content']) )))."</div>";

    Replace it with:

    $params['innerHtml'] = "<div class='avia_textblock avia_textblock_style' data-update_with='content'>".stripslashes(trim(html_entity_decode( $params['content']) ))."</div>";

    Best regards,
    Ismael

    #196927

    OK, I installed that plugin. Do you know what I’m supposed to use — Textile 1, Textile 2, Markdown, nl2br, or No Formatting?

    #197221

    Hi!

    I guess the safest option would be No Formatting.

    Cheers!
    Josue

    #197249

    Well, that removes formatting from other elements. I tried all the other options — they all seem to have negative side-effects — mostly in terms of removing paragraphs where I actually need them.

    UPDATE: I’m finding that if I just ignore the extra line breaks being added, and hit the blue “Update” button, the extra line breaks go away! NIce!

    • This reply was modified 10 years, 11 months ago by sky19er.
Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘unwanted extra line breaks being inserted’ is closed to new replies.