ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How do you format your paragraphs?

February 18, 2008 5:27pm

Subscribe [0]
  • #1 / Feb 18, 2008 5:27pm

    Matt Johnson

    45 posts

    So I’m working on a project that requires an image to be embedded in random parts of the article. (aka, can’t use a field and embed that field in a fixed spot). So we can’t have the field formatting to be “XHTML” (auto generating P tags after every return). 

    So my template looks like:

    {body}

    And the formatting to

    
    

    But now there is a large space between paragraphs, and in the body field there is only one return.  How do you guys format you’re paragraphs and setup the templates for large body of text?

  • #2 / Feb 18, 2008 5:35pm

    Lisa Wess

    20502 posts

    I set the {body} to xHTML (well I usually use Markdown personally) and leave the paragraph tags out of the template.

  • #3 / Feb 18, 2008 5:43pm

    Matt Johnson

    45 posts

    Okay, thanks.  I just wanted to see other peoples processes so I know whether the way I’m doing it is the best way or not.

  • #4 / Feb 18, 2008 8:16pm

    tbritton

    714 posts

    But now there is a large space between paragraphs, and in the body field there is only one return.  How do you guys format you’re paragraphs and setup the templates for large body of text?

    Use HTML markup inside of the body itself? That’s what I did.

    I often use the FCKeditor plugin V 1.19 for EE that permits use of FCKeditor as well - when you then double-click on a publish field, FCKEditor opens up. Just do that AFTER pasting text into it, or it will strip all the formatting out of it if there is some already. (Alternatively I cut the text out, double-click to bring in FCKEditor, then paste it back in.) Anyway, this is a WYSIWIG editor that does a good job of inserting the correct markup once you are finished. It can work in several modes, so it might be right for your application. It allows inserting pictures, too. And has a “large-window” view that I like.

    Terry

  • #5 / Feb 18, 2008 10:18pm

    Rob Allen

    3105 posts

    I normally wrap content areas in a parent DIV, similar to how the default templates are done, this allows any tags to be styled independantly, such as…

    <div class="entry-full">
    Paragraph content here…
    </div>

    Then specify styles like

    .entry-full p {
    line-height: 1.5em;
    margin: 0 0 1em 0;
    }
  • #6 / Feb 18, 2008 10:33pm

    Matt Johnson

    45 posts

    Thanks, for the feedback.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases