Line break issues (37 posts)

  1. troutish
    Posted 8 years ago #

    OK. So i've tried updating wordpress countless times, I've tried enabling//removing markdown, I've tried using other plugins and i've tried everything but restoring WordPress 1.x

    Still no matter what I do I CAN NOT GET LINE BREAKS when editing or creating posts. Paragraphs finish
    like this

    with NO breaks in between. Also when I Copy & Paste a post from the internet into wordpress (cross-posting is a key-element of my blog and had NO trouble with the really old, previous version of wordpress) it keeps font settings ETC from the other pages.

    I also get errors mentioned in another topic, when I save & continue editing, then later publish a post, the post publishes fine; but I recieve an error.

    I am not the only editor on this site (http://olivebranchoptimism.net) and the other editor is not yet HTML savvy, and as such I NEED the wordpress features to work!!!

    When someone writes a post with line breaks, THEY NEED THE LINE BREAKS. I can't go through every post adding <BR><BR> at the end of every paragraph manually, it's impractical.

    Anyone else had this trouble? Any way to fix this??? Is it fixed in the 2.1.x versions????????

    I really can't see any reason for it. Supposedly wordpress would detect double-returns, and input <p> tags accordingly to show a break; but this doesnt happen either. It is however inserting <p> tags at the beginning of paragraphs, and tags at the end....

    please explain???

    lukey at iinet.net.au if you could email any suggestions?? I'm stumped. I've been trying for a month (albiet in what little spare time I have) to fix the issue. I can't. I need your help!

  2. nakedape
    Posted 8 years ago #

    Well hello Troutish,

    In the modern age of the xhtml transitional doctype and semantically sound markup, you should try and end your paragraphs not with linebreaks (which by the way need to be closed in xhtml like so: <br />) but with the paragraph's closing tag (</p>).

    Anyways, I think this is how it happens:
    If you have the visual editor turned on (click 'my profile' in wp admin and find the checkbox), then your 'write post' page will have a tab to choose either visual or code editor.

    If you use the visual editor, then when you hit enter, the current paragraph will be closed (with

    ) and a new paragraph will be started. In the visual editor, if you want to have a linebreak (which, remember, should not be used as a tool for making faux-paragraphs, and one reason why is because the paragraphs are then not styled properly with css)... anyways, if you want to have a linebreak in the visual editor, hold shift and then press enter.

    If you use the code editor, paragraphs are NOT automatically created for you... instead, when you hit enter, a linebreak is created.

    Use the visual editor when pasting in your web text. Any paragraph and line break formatting should be retained.

    Does that help?


    - John

  3. troutish
    Posted 8 years ago #

    Most of the posts are copied from blogger, no paragraphing is retained when copy & pasting from blogger into the visual rich editor....

    Also, when editing these same posts in the visual editor (which I have been using the whole time), paragraphs will not end, period.

    Writing posts from scratch in the visual rich editor doesn't have any of these problems; it works perfectly if composed in the visual editor, just not when copy & pasted from elsewhere..

    Will the visual editor detect paragraphs if there is already spacing between the paragraphs when it is copied over??? (for example, from notepad?) or do I have to insert the paragraphs once it's in the editor??

  4. peiqinglong
    Posted 8 years ago #

    When copying and pasting from other locations, I would highly recommend that you use the html editor and not the visual rich editor. Many times I have noticed that the rich editor gets wonky...especially when you copy and paste from another site such as blogger. For whatever reason, the semantic markups are copied, such as bold this and italic that, and they translate it to wordpress. Try copying and pasting using the html editor and see if the same thing happens.

  5. nakedape
    Posted 8 years ago #

    I tested pasting the 5 paragraphs of text from the 'homesick' post at http://thevoxtrotkid.blogspot.com/ using the visual editor, and even though the blogger code used <br><br> to simulate paragraph breaks, the resulting wp code showed perfect paragraphs surrounded by <p></p> tags.

    I also went back and edited this post using the vis editor, hitting enter in the middle of an existing para to start a new paragraph, and this also worked fine.

    I'm running WP 2.1.2 though... maybe you could try upgrading?

  6. troutish
    Posted 8 years ago #

    thanks for the suggestions, I would love to upgrade but my server is only running mysql 3.2.* - I haven't quite the time nor experience with updating MySQL myself yet, and I am hoping to move my site to a newer, better server with more space and manouverability.

    I believe my problems would probably be resolved changing over to 2.1.* but for now can't... I guess it's just going to be a case of me going back and looking through posts in the html view after editing, to make sure no accidental
    has replaced where <p> or </p> should be...

    Thanks for your help everyone!

  7. drmike
    Posted 8 years ago #

    So you just came by to complain or would you like some help?

    Care to point at an example of what is occuring? That way we can actually see what the issue is instead of making guesses.

    Which editor are you using by the way? The regular text editor with the html codes along the top or the rich text editor with teh icons? Usually the regular text editor works better for folks if they care about the actual HTML that one uses. (Sounds like you do)

    Don't mind helping but being rude doesn't give you that good of a first impression.

  8. NoobieDoobieDo
    Posted 8 years ago #

    I came by to complain but it turns out I'm just being an ass.

    WordPress wasn't causing the issue, it was the theme (Mosaik 1.0). It's a very nice theme but it's breaking my code.

    I took a look at the css code and nothing obvious is jumping out at me.

    I've never seen CSS code that causes lines not to break so this is new to me.


  9. snap
    Posted 8 years ago #

    I'm having exactly the same problem!
    I'm using Simple theme and it won't show up paragraphs properly or line breaks at all (using <p> <br> and <br />).
    What code in the theme could be causing this problem?

  10. NoobieDoobieDo
    Posted 8 years ago #

    I'm unsure, I inspected some CSS elements from the theme that was breaking my <br /> and <p> and couldn't find anything relevant.

  11. NoobieDoobieDo
    Posted 8 years ago #


    My css file had this ->


    For the area in question that wasn't breaking lines .. after removing it everything is perfect.


  12. NoobieDoobieDo
    Posted 8 years ago #

    A little more details here

  13. maxblast
    Posted 8 years ago #

    i simply write an

    <p> </p>

    in my posts, this makes a blank row.

    a forced line break like this:

    <br> </br>

    made me quicktag buttons with it.....

  14. michaelbrazell
    Posted 7 years ago #

    I know that this is several months old and so I apologize for resurrecting it but this was the top post in Google for one of my searches.

    I find the visual editor in 2.2 to be completely dysfunctional, in both IE7 and the latest FireFox. I am trying to layout a page in it, something simple, with a few spaces, some images, some text next to the images, and so on... and no matter what I do, I cannot get any break returns or new paragraphs to be generated.

    If I hit enter, which would presumeably make a new paragraph, no new paragraph is created... It just pretends like I didn't do it when save/publish the page.

    I have gone into the code editor, and added paragraph tags where I need them... the appropriate <p> and </p> around where they should be, and if I hit "Save" and then go back to edit the page -- the changes that I made are gone, removed, nixed. This is remarkably troublesome and something that did not happen in prior instances of WordPress. To continue, even if I manually add the <p> and </p> in the code view, and then go to the Visual view, it removes the code that I added right then and there when I switch back. This is absurd.

    I've tried using IE7 and FireFox to no avail, I don't have any 3rd party plugins. I am using a custom theme but I've done themes in the past without trouble and this is happening with the default themes as well. WYSIWYG editors are a cool idea and they're functional in many cases, but if you cannot add break returns or new paragraphs without the software removing them automatically -- for no reason (as if the software thinks that it knows when I want paragraphs and when I don't) -- is a great hindrance.

    Eh, I'll keep trying.... but this is a huge problem for me.

  15. jeffhannan
    Posted 7 years ago #

    I am having the same problem as michaelbrazell. I cannot understand what the editor is doing with paragraphs under the Code tab.
    It looks like it removes any manually entered <p></p>, and replaces it with line breaks in the text box.
    However, because my css styles are not being applied to the paragraph, I am worried that it is not actually working correctly.
    Under that code tab, I want to see the tags. The Visual tab is for the wysiwyged version. So is this a bug?
    I want to remove the spacing between paragraphs, but I haven't found a way to do it, so it would be useful if someone could explain exactly what is going on in the editor.

  16. pad
    Posted 7 years ago #

    Well this is just outrageous.

    Seemingly nobody knows why on earth all <p> tags are being stripped from posts and pages when they are edited.

  17. jeffhannan
    Posted 7 years ago #

    Actually, I have resolved this issue (to my satisfaction) thanks to a solution mentioned in another thread somewhere.

    Under Users->Edit User, there is the option 'Use the visual editor when writing'. I turned this off, and it removes the wysiwyg editor, and gives a code editor that works.


  18. shambhavi
    Posted 7 years ago #


    I tried this, Jeff. It didn't work. Well, it's now not stripping the <p></p> out, but is ignoring them.

  19. theman007
    Posted 7 years ago #

    Hey guys, until i come up with something better, i am doing this work around to the above mentioned issue.
    <p>&!nbsp!;</p> < remove the exclamation points.

    this will get you by in a pinch.

    I think wordpress is just amazing and don't sweat the little stuff.

    Keep Smiling! ; )

  20. jeffhannan
    Posted 7 years ago #

    Sorry, I've realised that I also have the 'disable wpautop' plugin activated. See this topic on how to obtain it.



  21. joannakat
    Posted 7 years ago #

    Hi everyone,

    I'm sorry to say that even the nbsp workaround isn't working for me.

    I'm also sorry to say that I've posted a reply in a few of these topics now, so i apologize for the dups.

    but this is really a serious problem and there has to be some type of workable solution. It's not just the inability to insert a blank line, it's the waste of time involved--I've just spent hours searching the support section, and trying all sorts of things.

    any solutions yet? Please?

  22. jeffhannan
    Posted 7 years ago #

    Well, I've been okay for a while (line breaks when I want them), and I think it is with the following steps (if you see my posts above)...

    1. Install and enable the 'disable wpautop' plugin.
    2. Turn off the 'Use the visual editor when writing' option.
    3. Use the nbsp paragraph when I want to actually put in a line

  23. arcater
    Posted 7 years ago #

    For a real crack pot work around I put a period on the line where the break should be and change the font for it to white (the background color).

  24. barrald1213
    Posted 7 years ago #

    I am having the exact same issue as listed above. This is very serious, and I cannot stress enough the importance of this working correctly for my orginization. I'm sorry to ressurect an old post but I have tried all the above and found them to either not work or be highly impractical. I am not the only one that writes for my blog, there are many others that are getting increasingly frustrated.

    Does anyone have any ideas?

  25. dusano
    Posted 7 years ago #

    I'm designing a site for some guys that I can't force to do shortcuts or workarounds. They just want it to work.

    It seems to me that WP has a problem here and that it isn't our job to find strange solutions or workarounds.

    I use the default theme that comes with WP and it does not work here either (only of I remove the rich editor, but thats a workaround that removes a lot of functions).

    Awaiting some good answers from some gr8 guys out there.


  26. animalien
    Posted 7 years ago #

    I am also having this problem. I didn't install any plugin to remove the p or br tags. I enter them in manually and they dissapear.

    The bigger problem is that I have other sites pull the feed from mine, and with this the entry becomes a jumbled mess because it does not know where the line and paragraph breaks are.

    The Cdata in the RSS really needs to include these tags. Otherwise what looks like this:



    Will show up on non WP sites as:



  27. dusano
    Posted 7 years ago #

    Noticed that if I upload a picture in a post, everything works perfect for that spesific post (still not for the others).

    Can be something to work on if someone from WP reads this.


  28. silverpeak
    Posted 7 years ago #

    Hello, adding my 2 cents to this... I just spent an afternoon trying to figure out why my line breaks keep disappearing. I just installed wordpress to see if i likes it better than iWeb, which i have been using for a year. It has many more "blog" features so I was very excited about trying it out... it has been a nightmare ever since.

    I am about to give up, I post, it looks fine... Then I edit and all my line breaks disappear. I don't add <p> tags (someone said not to, others say to do that) and have tried many patches that people in other posts swear by.

    I realise this is a free service, open source and all... but I have better things to do with my time than struggle with a bug I see has been complained about through several updates of WP. Sorry to bitch on my first post, but I am at wits end here.

    thanks for listening to my rant.

  29. dusano
    Posted 7 years ago #

    GUYS !!

    I just discovered that as soon as I adjusted the text left og right everything is OK.

    It seems that when you do that it adds codes to the content of the post and jubaluba it works.

    A workaround that can't be accepted, but may be a hint to someone that reads these comments and works for WP... hopefully... Still this will be a thing I can tell my users to use untill something happens.

  30. cacycleworks
    Posted 7 years ago #

    wow, this really is amazing. one would think that editing in code/html mode meant you keep some control. i'm trying to get a site up and haven't bothered to do much more looking, but this fixed the problem for me:

    1) turn off the rich text editor in user profile
    2) edit file: (base) wp-includes/formatting.php

    after line 62 which has:function wpautop($pee, $br = 1) {
    add this: return $pee;

    And wpautop will not mess with your html tags much ... it does still convert <br> to < br /> and it performs the php html_encode (or htmlidentities) function to special characters, like quotes.

    Here is I found the above file to edit:

    linux prompt at wp-install-dir$ grep -Rn "function wpautop" *
    grep: wp-content/plugins/aa-rewriterules-viewer: Permission denied
    wp-includes/formatting.php:62:function wpautop($pee, $br = 1) {
    wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js:571:function wpautop(pee) {
    linux prompt at wp-install-dir$

    Grep has been amazing at understanding the layer upon layer of WP's innerworkings.

Topic Closed

This topic has been closed to new replies.

About this Topic