• Resolved wpdevind

    (@wpdevind)


    I’ll be happy to pay $50 to the first person who helps me solve this problem. I can pay using PayPal or send an amazon.com gift voucher or any other gift voucher I can buy online.

    Here’s my problem: I’ve recently migrated to wordpress from blogger. My site looks great on Chrome but when I access any post on IE or iPad the line-breaks are all messed up. I’m at my wit’s end. I’ve already tried adding tags in the HTML but it makes absolutely no difference.

    Pl see my test post where I’ve explained the problem more thoroughly on http://stage.omswami.com/2014/09/test-post-5.html

    When I access it using Chrome, blockquote and other line breaks render just fine. But when I use iPad or IE, it completely ignores all line breaks. Interestingly if I choose pre tag for example, it works just fine. The line breaks don’t work for paragraphs and blockquotes.

    I’ve been trying to resolve this for hours. Will really appreciate any assistance.

    Thank you.

    -Dev

Viewing 7 replies - 1 through 7 (of 7 total)
  • Try using tinymce advanced plugin, there is an option to ‘Stop removing br tags’

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Please don’t offer to pay. These are free forums. Thanks. 🙂

    Your Scenario 3 section doesn’t have any BR tags in it. Just P tags. This is the HTML:

    <p>“Is it true that there is no soul?” he said.
    “Yes, it is true  that there is no soul,” Buddha murmured softly.
    His disciples were happy to hear the answer. The Sage knew everything, they thought.</p>
    <p>The next day, another visitor posed a similar question.
    “I’ve heard that there exists in everyone an eternal element called soul. Is it true?”
    “Yes, my dear, it is true that  there exists in everyone an eternal element called soul. Some also call it consciousness.”
    “But, soul is different from consciousness,” he argued.
    “Indeed,” said Buddha.</p>
    <p>His disciples looked at him and each other in complete disbelief. The reply today  was the exact opposite of what they’d heard just the day before. Even though confused as ever, they dared not question the master.</p>

    No CSS can add BR tags where none exist. If you’re using the Visual Editor, you can use SHIFT-ENTER to insert a line break and not start a new paragraph.

    So, typing “Line 1[ENTER]Line 2” would create two paragraphs, while “Line 1[SHIFT-ENTER]Line 2” would create one paragraph with a BR in the middle of it.

    Thread Starter wpdevind

    (@wpdevind)

    Hi Hakkim, I tried that but with Advanced TinyMCE it doesn’t work.

    Hi Samuel. Apologies if I breached any rule by offering to pay. I tried entering Shift-Enter but it somehow removes them. I am looking at View Source for Scenario 3 in Chrome and this is what I see:

    <p>“Is it true that there is no soul?” he said.<br />
    “Yes, it is true that there is no soul,” Buddha murmured softly.<br />
    His disciples were happy to hear the answer. The Sage knew everything, they thought.</p>
    <p>The next day, another visitor posed a similar question.<br />
    “I’ve heard that there exists in everyone an eternal element called soul. Is it true?”<br />
    “Yes, my dear, it is true that there exists in everyone an eternal element called soul. Some also call it consciousness.”<br />
    “But, soul is different from consciousness,” he argued.<br />
    “Indeed,” said Buddha.</p>

    And interestingly, for Scenario 1, I see the following (even though there are no br tags but it renders the carriage returns just fine.)

    “Is it true that there is no soul?” he said.
    “Yes, it is true that there is no soul,” Buddha murmured softly.
    His disciples were happy to hear the answer. The Sage knew everything, they thought.
    
    The next day, another visitor posed a similar question.
    “I’ve heard that there exists in everyone an eternal element called soul. Is it true?”
    “Yes, my dear, it is true that there exists in everyone an eternal element called soul. Some also call it consciousness.”
    “But, soul is different from consciousness,” he argued.
    “Indeed,” said Buddha.

    So my logic is that something is specific to pre tag that it’s handling the carriage returns alright. Can’t I do something similar to p tags? Plus, I’m trying to avoid going through every post. I thought there might be a simpler solution. Because all these posts work on all devices on the original website on blogger.

    Thanks

    Thread Starter wpdevind

    (@wpdevind)

    Thanks Andrew. Just saw your message. I’ll use the websites you mentioned.

    Any text in a PRE tag, will be shown “as is”. A new line in the source will show a new line on the site. No B` is needed there.

    It will also show the same amount of spaces. In normal HTML, if there are two or more spaces between words, it will still show just one on the site. However, when it’s in PRE tags, the site will show the actual amount of spaces.

    Note: PRE stands for PRE-FORMATTED, because newlines and spacing is already formatted for you and doesn’t require HTML.

    A very dirty (and not recommended) way to sort this, is to keep your text in PRE tags, and then with some CSS give it the proper font type/size, get rid of the border, etc. Again, I do not recommend that, but it does work.

    If you want to keep things nice and clean, you’ll really have to use Samuel’s way (using ENTER for a new paragraph, and SHIFT+ENTER for a new line).

    And if that doesn’t work for you for some reason, you can also just edit your content in TEXT mode (not VISUAL) and add the BR HTML tags yourself.

    Thread Starter wpdevind

    (@wpdevind)

    Thank you Senff.

    I did try Samuel’s way but not sure if it’s a theme issue but it still doesn’t work on iPad or IE. The only solution that’s working now is that I’m manually copying the post from Chrome and pasting it in my Visual Editor but it still messes up the blockquotes so, I’m manually fixing each one of those. I was hoping for a simpler solution. Anyway, thank you for your time.

    You are right, using pre tag is bit dodgy.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘$50 prize. Pl help. Line breaks not working’ is closed to new replies.