WordPress.org

Ready to get started?Download WordPress

Forums

Extra Line breaks - Need help pleeeease (11 posts)

  1. pitarr
    Member
    Posted 4 years ago #

    Can someone please help me out why is this so hard. I have tried everything from installing new editors, all sorts o plug-ins but nothing works.

    Here is my problem:

    Lets say i am trying to make a new post and enter this text

    Luda si, al' ja sam ludji za tobom
    cekam te, al' vec je za nas prekasno
    rano je, rano da te zaboravim
    kasno je da te jos jednom poljubim

    One i hit publish the text will look like this

    Luda si, al' ja sam ludji za tobom

    cekam te, al' vec je za nas prekasno

    rano je, rano da te zaboravim

    kasno je da te jos jednom poljubim

    It keeps adding <p> to every line of my text, now i have allot of pages to post i can not go into every single page and fix that myself.

    Please tell me how i can prevent wordpress from adding extra line breaks

  2. pitarr
    Member
    Posted 4 years ago #

    I tried the

    Disable WPAUTOP
    but then it makes it all one big block of text and when you try to put lyrics up that does not look good at ALL.

  3. pitarr
    Member
    Posted 4 years ago #

    up

  4. shadowfoxza
    Member
    Posted 4 years ago #

    I have a similar problem to that - in addition I find that the editor has the very annoying habit of adding the following into the HTML:

    <p><br class="spacer_" /></p>

    I suspect the spacer itself wouldn't be a problem - except that like with the OP's example - it keeps wrapping everything in <p> tags - and makes it really difficult when I'm trying to put images in a post - I end up with huge gaps beetween my text and images - which I then have to manually edit in the HTML - and then publish the post, because switching back to Visual mode puts them back in.

    Is there any way to disable this?

  5. mrmist
    Forum Janitor
    Posted 4 years ago #

    Presuming that you are typing in your posts like this

    Luda si, al' ja sam ludji za tobom<enter>
    cekam te, al' vec je za nas prekasno<enter>

    Then the editor is doing exactly what you ask. You'd need to look at your CSS to minimise the spacing between the paragraphs.

  6. shadowfoxza
    Member
    Posted 4 years ago #

    Presuming that you are typing in your posts like this

    Luda si, al' ja sam ludji za tobom<enter>
    cekam te, al' vec je za nas prekasno<enter>

    Then the editor is doing exactly what you ask.

    This much I'm already aware of - which is why when I just want a line-break I use <shift><enter>. This worked perfectly in older versions of wordpress, and I don't see why it suddenly had to become an issue now.

    Regardless - I'll go play around in my CSS, but I don't think that's the problem.

  7. mrmist
    Forum Janitor
    Posted 4 years ago #

    I just checked this out on a stock 3.0 install, entering

    TEST<enter>
    
    TEST<Shift+enter>
    Test

    Produces output with the correct sort of spaing. (That is, the shift+enter is shown as a <br />

    Have you changed anything else? Plugins etc?

  8. shadowfoxza
    Member
    Posted 4 years ago #

    That's pretty much what I expect to happen (what you've posted above)

    As for plugins - I'm running quite a few - but the one that's probably relevant to this is TinyMCE Advanced (latest version). I generally don't have a problem with it (I've been using it for a while now) - but like the OP pointed out, switching between Visual editing and HTML editor it ends up treating every line break as a paragraph ... and ends up wrapping it in <p> tags.

    And whenever I put in images it puts in the '<p><br class="spacer_" /></p>' code between images and text, and I end up with massive white spaces which I need to edit out.

  9. mrmist
    Forum Janitor
    Posted 4 years ago #

    It could be that there is some incompatibility with the plugin and WP3 that is causing this new behaviour. Since the stock install behaves as you would expect, there must be something around your plugins or specific setup that is causing your version to behave differently. TinyMCE Advanced seems like it could be a candidate.

  10. shadowfoxza
    Member
    Posted 4 years ago #

    Guess I'll just keep doing things the hard way then until they come up with a fix :) It has too many features I need for me to deactivate or remove it.

    Thanks for the time :)

  11. Rhand
    Member
    Posted 3 years ago #

    @ shadowfoxa Did you ever find a solution for this? I want to add breaks and extra enters when need be, but with TinyMCE running both seem to be turned into paragraphs when switching to html view. Like this shift enters in paragraphs split the paragraphs up in two and enters create new paragraphs with padded breaks <p><br class="spacer_" /></p>. If I do not switch to html view shift enter is turned into a break and kept. I guess I should not move to html view when planning to keep breaks, but when you need to you are in trouble..

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags