<p> tags in TinyMCE needs two to just make one paragraph

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
hiltron
New Member
New Member
Posts: 2
Joined: Mon Jun 29, 2009 10:07 am

<p> tags in TinyMCE needs two to just make one paragraph

Post by hiltron »

Hey Guys,

I am working on a clients website and the backend tinymce preview is not really the same as what shows up on the front end. For some reason there needs to be two sets of tags to give the same visual effect as one tag.

For example.

Code: Select all

<p><strong>some text? </strong></p>
<p><strong> </strong></p>
<p><strong>and some more</strong></p>
comes out as
Some text?

and some more
Whereas

Code: Select all

<p><strong>some text? </strong></p>
<p><strong>and some more</strong></p>
comes out as
Some text?
and some more.
Has anyone come across this or has any idea how to fix it?

Thanks
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: <p> tags in TinyMCE needs two to just make one paragraph

Post by Dr.CSS »

If you want more space between your paragraphs add margin or padding...
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm

Re: <p> tags in TinyMCE needs two to just make one paragraph

Post by Jeff »

It is your styling for in your stylesheet. Add some margin:5px (the exact px number is up to you).
User avatar
FirstGateDreamer
Forum Members
Forum Members
Posts: 15
Joined: Mon Nov 10, 2008 5:42 am

Re: <p> tags in TinyMCE needs two to just make one paragraph

Post by FirstGateDreamer »

I also have this problem. :(

Designers shouldn't have to change their stylesheets especially if things render properly in all browsers.

Is there a way to change the style for how TinyMCE renders the content?

I've also noticed there to be padding/margin issues with other elements such as headings when using this WYSIWYG.

Unfortunately I just know my clients would end up making a mess of their pages. Users can't tell the difference between a hard and soft return.
User avatar
FirstGateDreamer
Forum Members
Forum Members
Posts: 15
Joined: Mon Nov 10, 2008 5:42 am

[solved] style problems with TinyMCE preview (margins and padding)

Post by FirstGateDreamer »

I figured it out and I didn't have to change my stylesheet.

You have to add some style to the plugin.

Go to the TinyMCE module panel and pick the Advanced tab.

The last settings box "Additions to stylesheet" gives you the option to add styles (go figure :P)

here is what I added and it all looks good and it doesn't mess with my output.

Code: Select all

p {
  margin-top : 30px;
}
br {
  margin : 10px;
}

Hope this helps others too.
Last edited by FirstGateDreamer on Thu Oct 29, 2009 3:23 am, edited 1 time in total.
netfly

Re: <p> tags in TinyMCE needs two to just make one paragraph

Post by netfly »

margin or padding should works
Post Reply

Return to “Layout and Design (CSS & HTML)”