Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #803227

    This is an old problem I just can’t seem to fix. Whenever I want to use either &nbsp; or single line break <br>‘s, after saving the edit, I look back at the code and my edits are gone. The &nbsp; or <br> simply vanishes.

    Is there a fix for this? In some cases I must use non-breaking spaces. For example, in an address in Canada, we use Postal Codes such as the one at home:

    K1N 5G4

    … and I have to use a non-breaking spaces between the two parts, or in some cases the Postal Code ends up divided onto two lines of text.

    Obviously this is also true of things like when you have to spell numbers such as:

    1 000 000

    Where you can end up with 1 000 on the first line and 000 on the second line.

    PLEASE HELP!

    • This topic was modified 7 years, 5 months ago by GabrielSenn. Reason: edited to make it clearer
    #803320

    Hey GabrielSenn,

    Please, may you provide us your WP credentials and the website link?

    Best regards,
    John Torvik

    #803441

    Hello John,

    Info attached in the Private Content box.

    I imagine I do not need to tell you this, but just in case… Even though I make frequent backups, please be very careful as I have several weeks of work on this project.

    FYI, as far as I can tell the problem does not seem to be plugin related, so if you can please avoid turning off plugins.

    Thank you in advance!

    #804745

    Is anyone looking into this? It has been a few days since I created the account and all the documentation for you.

    #804804

    Hi,

    How do you end up with two lines when adding the text “K1N 5G4” and “1 000 000”? The editor removes special characters and html markup when they are not necessary so if you want to create another line, just press the “Enter/Return” key. We added new content in the page. (see private field)

    Best regards,
    Ismael

    #804815

    Hello Ismael, thank you for your reply. I think you might be missing the point; I *need* to use &nbsp; and <br> from time to time. They are not “html markup that is not necessary” most of the time. I can understand how it might seem that way but that isn’t always the case.

    When text reflows (particularly true when formatting text that will reflow on mobile devises), you can end up with something looking really badly if you use returns rather than the appropriate character/solution. &nbsp; and <br> are typographic necessities.

    The question remains, is there a way to ensure I can keep &nbsp; and <br> when I need them?

    Thank you in advance for your help!

    PS. How do you end up with two lines when adding the text “K1N 5G4” and “1 000 000”?
    When either or ends up at the end of the line. The problem with returns, again, is that it can screw things up when presented on other devices or if the user does not have the same typeface as specified available in their system.

    #804860

    Hi,

    When either or ends up at the end of the line. The problem with returns, again, is that it can screw things up when presented on other devices or if the user does not have the same typeface as specified available in their system.

    I’m not sure how typefaces would affect line breaks and character spaces. Could you please provide a screenshot where you see this issue? As you can see in the test page, we created spaces and line breaks without using special characters and html markup.

    When text reflows (particularly true when formatting text that will reflow on mobile devises), you can end up with something looking really badly if you use returns rather than the appropriate character/solution.   and
    are typographic necessities.

    Unfortunately, that’s not the case with the default WordPress editor. Those characters and markups are automatically remove from the content because they are considered unnecessary. However, you can disable the wpautop feature which filter the content.

    // https://codex.wordpress.org/Function_Reference/wpautop
    // https://wordpress.org/plugins/toggle-wpautop/

    Best regards,
    Ismael

    #805189

    Thank you for the thoughtful reply Ismael. With a little more research, I can see that both problems are indeed with WordPress and not the Enfold theme.

    https://wordpress.org/plugins/toggle-wpautop/ is a good option for the <BR> problem and I will investigate it.

    As for the &nbsp; issue, I found an option here: https://wordpress.org/plugins/automatic-nbsp/

    …is neither ideal nor perfect, but it will help (and want to share it because it might help others, too).

    Here are some examples in which it is super useful:

    (from their site) Support punctuation marks in French
    Adds a non-breaking space &nbsp; before punctuation marks as ! ? ; % « »

    • This reply was modified 7 years, 5 months ago by GabrielSenn.
    #805880

    Hi,

    Thanks for the feedback and for sharing, much appreciated. Please let us know if you should need any further help on the topic.

    Best regards,
    Rikard

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