Let us force a line break

  1. Inactive

    the only correction that worked for me is use &nsp; and then use another /br/ tag

    Posted: 12 years ago #
  2. jdaviescoates


    I still have this problem and its really doing my head in.

    Like others on all the other threads about this...

    (2 months ago, 3 replies)
    (2 months ago, 11 replies)
    (9 months ago, 2 replies)
    (9 months ago, 32 replies)
    (10 months ago, 47 posts)
    (1 year ago, 27 posts)

    ...I can't believe that WP has messed this up so badly and for so long (over a year).

    All we want is line breaks. Is that really too much to ask?

    When I did what cutout suggests in one of the threads above I thought I'd solved the problem (for a moment), because when I clicked on html button and manually added and then update, the line break were still there, and when hit html again they were still there too, but as soon as I actually hit save and viewed the page, there were no line breaks!

    I've tried changing some of the parameters in the tiny_mce.js file too, but to no avail.

    Please, please, please, someone fix this bug!

    I'm on WP 2.0.2 but from what I hear from friends 2.1 still has this problem.


    /me cries

    Posted: 12 years ago #

  3. Inactive


    An essential fix.

    Posted: 12 years ago #
  4. billrdio


    Just a suggestion, but WordPress should keep any and all HTML tags entered in via the Code tab and only do filtering/parsing like this if the you use the Visual tab.

    Posted: 12 years ago #
  5. billrdio


    Warning - I haven't tested this extensively ...

    The following appears to work for me (Firefox 2.0 Windows; WordPress 2.1.3):

    1) Disable the visual editor via the User options screen

    2) add the following line in
    as the first line in the wpautop() function:

    if ( preg_match('/<!--DISABLE_WPAUTOP-->/', $pee) ) return $pee;

    Basically what I'm doing here is saying that if I put in a specific HTML comment in my post, then I disable the wpautop() function for that particular post. And I do step #1 above because if I add this hack with the visual editor turned on, then when I go back to edit posts, I end up with all of my HTML that I added getting removed.

    So, I figure that this is a nice way to solve this problem for people like myself who want to have complete control while still allowing other contributors for my blog to continue using Word Press as a WYSIWYG HTML editor.

    Posted: 12 years ago #
  6. Mr_Cynical


    This is something that is needed, but it wouldn't make me use the 'visual editor'. If I want some shiny piece of garbage that can't take advantage of half the features WordPress has, then I'm perfectly capable of downloading Windows Live Writer :P

    Posted: 12 years ago #
  7. meta


    Either there are a lot of people here who don't know how to type a linebreak, or this has been fixed in a recent WordPress 2.1 release.

    In WordPress 2.1, in the visual editor, using Firefox: Typing Enter gives you a paragraph break. Typing Shift-Enter gives you a linebreak. Just like a word processor.

    Paragraph breaks cause a new P element to be started, linebreaks are translated to BR elements.

    No HTML knowledge is required. No hacks are required.

    Posted: 12 years ago #
  8. billrdio


    Yes, I know how that works and I don't have a problem with that. My problem (and I suspect I'm not the only one) is that WordPress insists on adding BR and P elements into my Post or Page entry even when I use the Code tab. If I go to the trouble to use the Code tab, then WordPress should use the HTML EXACTLY as I entered it and NOT put in any extra elements.

    That is why I came up with a hack to get WordPress to quit messing with my HTML! And this isn't an issue of me being picky and wanting my HTML just so (though if that were the case, I don't think there is anything wrong with that). There have been several times where I wanted to put something in a Post, like a Java APPLET and WordPress decides to add in P elements inside my APPLET tag (only PARAM elements should be inside the APPLET element).

    Posted: 12 years ago #

  9. Inactive


    I've been researching this problem for weeks now, and still no solution. What a terrible thing, to have the code tell you that what you are doing is wrong. I have tried many things, and none have worked. Why hasn't someone solved this issue yet? Is there not a solution for someone who is not proficient at HTML, to use the visual editor and just have the thing respond the way they might desire?

    The solution I have used is to left align everything, and wordpress places a   in each paragraph, and wordpress does not mess with this tag as it sees it as necessary; thus solving the solution temporarily, although this should not have to be.

    Posted: 12 years ago #
  10. sfcrotty


    1) Please change how the text editor handles line breaks. If I enter a line break tag, don't change it. If I enter a paragraph tag, don't change it.

    2) The Code tab on the WYSIWYG editor should show...*code*. All of the code, including the paragraph and line break tags.

    Posted: 12 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.

  • Rating

    426 Votes
  • Status

    Sorry, not right now