1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Editting Posts - Problems with new lines/spaces

Discussion in 'Troubleshooting and Problems' started by Pathurs, Jul 22, 2012.

  1. Pathurs

    Pathurs Member

    While editing posts on my forum, sometimes when I add an extra space between words, the space will appear in the editor, but when I click 'Save Changes', the space is not added.

    Also, while adding new lines with the 'Enter' key, the new lines do not appear to have worked, but when I click 'Save Changes' the lines are there, I thought this was some kind of Max Limit per post, but I can add as many extra characters, but not spaces or new lines properly.

    Is this a bug that needs to be fixed?

    NOTE: The new line bug seems to main happen after something that has been put as bold or underlined

    - Pathurs
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Sometimes it's normal for extra white space to not render. That is true for white space between words. These two words have 10 spaces between them, but you can see it doesn't render that way:

    foo bar

    Line breaks between text should render (as before this line), but not at the beginning or end of the post.

    The code tag uses preformatted text to preserve white space if needed:

                  asdfapoij   jjjd          asdfafsd  
        sadf                             poijpoij
    Also, when manually formatting your posts it can be helpful to use the plain text editor which you can toggle by clicking the Screen shot 2012-07-21 at 11.08.46 PM.png button in the editor. The rich editor can sometimes hijack your formatting.
  3. Pathurs

    Pathurs Member

    I will check all this out, thank a lot!

    Is there a way to allow multiple spaces without the code tag?
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    There is indent and alignment:


    Or you could fake it with a blank inline image, but that's dirty.

    You can apply the white-space attribute to the message area:

    Admin CP -> Appearance -> Templates -> EXTRA.css

    Add this CSS:

    .message .messageContent
    	white-space: pre;
    But that really fouls things up as you will see. It preserves too much white space.

    Probably the best solution would be to create a custom BB code for this purpose, like the code block but without the box around it.

  5. Pathurs

    Pathurs Member

    I will try the BB code i think

Share This Page