WordPress.org

Ready to get started?Download WordPress

Ideas

Let us force a line break

  1. emregoyce
    Member

    I had to set up several templates and just play around with return, (shift) return, return, (shift) return. NBA

    Posted: 4 years ago #
  2. jacobwh
    Member

    I use this:

    <br class="blank" />

    Works like a charm on all my blogs.

    Anyone tried Tiny MCE or other replacements?

    Posted: 4 years ago #
  3. ok12tay
    Member

    I use this:

    <br class="blank" />

    Works like a charm on all my blogs.

    Anyone tried Tiny MCE or other replacements?

    Posted: 4 years ago #
  4. kevinator
    Member

    Thank you, grizzdesign. Finally, a simple fix.

    Posted: 4 years ago #
  5. shoregirl
    Member

    I use TinyMCE + the TinyMCE Advanced plugin (which also gives you good table options).

    In the options setup for TinyMCE Advanced, there's a checkbox for "Stop removing the p and br tags..." which does exactly what it says. Works for me.

    Posted: 4 years ago #
  6. adamsmith
    Member

    I had to edit formatting.php in order to keep wpautop() from removing my deliberate breaks. I commented out the following line which replaces two occurrences of BR separated only by whitespace with two newlines:

    //$pee = preg_replace('|<br />\s*<br />|', "\n\n", $pee);

    Then, I commented out this line found towards the end of the function and replaced it with a version that exempts BRs from being removed:

    Commented out:
    //$pee = preg_replace('!<br />(\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)!', '$1', $pee);

    Replaced with:
    $pee = preg_replace('!(\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)!', '$1', $pee);

    This keeps wordpress from stripping the breaks, but it does not keep Tiny MCE from doing it if you go to visual mode. I peeked into the tiny MCE javascript and didn't like what I found--no comments, not even linebreaks in the code. I won't be editting that, I'll try the tinyMCE Advanced plugin recommended by shoregirl.

    Posted: 4 years ago #
  7. Alterity
    Member

    extremely annoying, I agree, and I thank adamsmith for the solution provided.

    Posted: 4 years ago #
  8. disable
    Member

    An essential fix.

    Posted: 4 years ago #
  9. vaccine33hero
    Member

    PPPPPPPPPLLLLLLLEEEEEEEAAAAAASSSSSSSSSEEEEEEEE

    PUT THE LINE

    BREAK

    IN

    Posted: 4 years ago #
  10. Samuel Wood (Otto)
    Tech Ninja

    12345

    Several other editor plugins exist already. And adding vertical space by hitting enter a bunch of times is the wrong way to do it.

    Suggest closing.

    Posted: 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.

  • Rating

    12345
    426 Votes
  • Status

    Sorry, not right now