Site logo

[Resolved] Preformatted block not keeping the formatting on mobile

Home Forums Support [Resolved] Preformatted block not keeping the formatting on mobile

Home Forums Support Preformatted block not keeping the formatting on mobile

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #2121836
    Jagmeet

    Hi,

    I have a preformatted block on a page (above the ToC), that keeps the spaces between lines on desktop, but when I view it on mobile, the line spaces are not there. The block does not preserve the formatting on the mobile devices.

    The link is shared in the below.

    What can I do to fix this?

    Thanks!

    #2121840
    Leo
    Staff
    Customer Support

    Hi there,

    Not sure if I’m seeing the issue.

    This is what I see on the desktop view:
    https://www.screencast.com/t/uqNAXK8e

    And this is the mobile view:
    https://www.screencast.com/t/MgMzUvbMBN

    The space seems the same to me.

    Can you elaborate?

    #2121849
    Jagmeet

    Hey Leo,

    I see line spaces between the bullet lines on my desktop.

    View post on imgur.com

    #2121868
    Leo
    Staff
    Customer Support

    That’s not what I’m seeing.

    Can you disable any caching plugin or SG optimizer first?

    #2121883
    Jagmeet

    Done. I have purged the cache and disabled it.

    I still see the line spaces on desktop site, but not on the mobile.

    #2121892
    Leo
    Staff
    Customer Support

    I still don’t see any line spaces on the desktop and am also seeing SG optimizer still activated:
    https://www.screencast.com/t/TPZhoc7G6q

    I’ve hard cleared my browser cache and tried incognito mode.

    #2121918
    Jagmeet

    Can you try again now? I have deactivated and deleted the plugin from my site.

    #2121957
    Ying
    Staff
    Customer Support

    Hi Jagmeet,

    It seems working fine on both desktop and mobile now:
    https://www.screencast.com/t/odcXM8hg

    #2122387
    Jagmeet

    Yea, it is working fine now.

    Seems like the caching plugin is minifying or something else to the preformatted block. Maybe if I exclude the preformatted HTML from minifying that would help. How to I find the preformatted HTML block code?

    Thanks!

    #2123026
    Jagmeet

    When I try to add <br> or <p> to preserver the formatting in the preformatted block, these tags get removed and everything gets squished together.

    #2123067
    Ying
    Staff
    Customer Support

    As Preformatted block is a WP core block, GP doesn’t have control over it.
    Here’s its documentation:
    https://wordpress.org/support/article/preformatted-block/

    And if you are having trouble with it, reach out to WP:
    https://wordpress.com/support/wordpress-editor/blocks/preformatted-block/

    Thanks!

    #2123158
    Jagmeet

    Thanks for the pointer.

    #2123200
    Ying
    Staff
    Customer Support

    No problem 🙂

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.