WordPress.org

Ready to get started?Download WordPress

Forums

formatting single spaced content (6 posts)

  1. David Tierney
    Member
    Posted 4 years ago #

    I am a webs designer/developer who has used WP for several clients as a CMS. One problem I am having is setting it up so that my clients can use the Visual editor to enter an address or similar list where you have several lines tight together, followed by either another set, or just paragraph text, etc.

    For example, if I wanted to add an address below:

    My Name
    1234 My Street
    Somewhere Town, CA 12345

    That is easy here, because I can type an empty paragraph and it will remain, thus allowing me to control the space before and after the address. Given the way WP is set-up with its wpautop, you can't do that. And because of that, I do what is common, which is is to create padding or margin after a paragraph as a way to create that natural spacing needed between paragraphs. There is no way to create a line break in the visual editor, so no way to create a series of lines tight together, unless I customize the css to style, say the Address as single spaced, and use that formatting for that - problem with that is, after the address, there then needs to be space after it, but there isn't.

    Another client I have has a list of personal they simply want to list as such:

    John Doe
    President
    email address

    Fred Small
    VP
    his email address

    and so on...

    again, same problem.

    Doesn't anyone else have this problem? Any solutions? I looked at one plugin that might have worked by adding a break button, Post Editor Buttons, but it only adds buttons to the html editor, not the visual editor. I need this to work for people who don't know code.

    Thanks,

  2. Dan Cole
    Member
    Posted 4 years ago #

    When they want to type in an address, they can click on the kitchen sink button (Alt+Shift+12), then change the format from paragraph to address. Their problem is due to the fact that the format is paragraph by default, which creates a lot of empty space after the paragraph is returned.

  3. David Tierney
    Member
    Posted 4 years ago #

    If you select Address as the format so that there is no spacing after each line, (giving the tight line effect), you still end up with the problem that after your address, whatever comes next, there is no spacing now to create the visual break between the address and what comes next. So you get this:

    My Name
    124 Street
    City, State 12345
    Here is my paragraph text afterwords, which I would not want to be spaced so close to the paragraph, but is so because what is above it has no spacing.

  4. davidperriard
    Member
    Posted 4 years ago #

    hey

    I'm not quite sure if i understood your question
    But isn't ENTER creating a new paragraph, i.e a <p> and SHIFT + ENTER creating a new line, i.e. a
    ?
    So you would need to tell them a small space is a SHIFT + ENTER and a large space just an ENTER.

    Dave

  5. davidperriard
    Member
    Posted 4 years ago #

    Sorry <br /> should be the question mark

  6. David Tierney
    Member
    Posted 4 years ago #

    Thank you Dave. I never knew that you could use SHIFT + ENTER to create a line break. What a serious revelation that is. Man, I have been working on WP sites for years and just couldn't wrap my head around why that wasn't built in. Thanks so much. You made my day.

Topic Closed

This topic has been closed to new replies.

About this Topic