• I have noticed that the WordPress html editor doesn’t have any <p> tags so I have to manually add <p> </p> if I want to insert a line space.

    My client finds this a pain and frankly I am at a loss to explain why the editor is like this.

    Is there a setting in the editor I can change to resolve this? thanks.

Viewing 8 replies - 1 through 8 (of 8 total)
  • WordPress will add paragraph tags automatically on the page. Even though they are not in the editor they will be on the generated page.

    If you want a line space you should add an empty paragraph.

    Thread Starter bikeman123

    (@bikeman123)

    And how is an empty paragraph added in the visual editor? Line feeds added in the visual editor are auto stripped out on save.

    The only way I can see to add empty paragraphs is to tell my client that they have to switch to html editing, locate the position (which may be difficult if they can’t read html markup) and insert <p> </p>

    A somewhat pants solution for non-tecys

    I believe WordPress uses the tinymce editor. I have used this in other CMS without this problem. Why?

    Is there an alternative editor?

    My wp does create empty paragraph if I push return twice. However you should never have empty paragraphs it’s not valid mark-up. If you need more space you should adjust it in your css, not in the html.

    Thread Starter bikeman123

    (@bikeman123)

    when I push return twice I get an empty paragraph but it is stripped out on saving. The editor even strips out line breaks.

    why on earth should you never have empty paragraph tags? I’ve never heard that before.

    How exactly do you recommend adjusting the css to insert a little extra space below individual paragraphs? Bear in mind that I can’t expect my client to selectively use classes on individual paragraphs.

    How about answering my questions;
    can the editor settings be changed?
    is there an alternative editor available?

    Well a paragraph tag is used to markup a paragraph, and a space is not a paragraph.

    I don’t think theres an alternate editor for wordpress but if they were a quality one would not allow for bad markup.

    It would help to see why you want more space them it would help decide what the best approach is. Like for instance if it’s a different section then you might insert an hr tag with the right CSS to create the spacing. Or if it’s the last paragraph you could use p:last. There’s a solution for you but it may vary based in your problem.

    Another possibility May be to add the style to the style drop down but I have never done that.

    Generally, any time you switch from the HTML view to the Visual Editor, invalid HTML will be removed. You can get around this by saving in HTML and then never switching back to the visual editor. Not perfect, but it works.

    However, lerizzle is right, the proper way to do this is in the style sheet (style.css)

    The visual editor in the current version of wp adds a paragraph when you hit enter but the code only show when the html is rendered. To jump an extra space, hitting enter again will show &nbsp; in the html editor.

    another test of a paragraph
    
    this begins a new paragraph and now
    
    &nbsp;
    
    I add two spaces

    .

    This will render as

    <p>another test of a paragraph</p>
    <p>this begins a new paragraph and now</p>
    <p>&nbsp;</p>
    <p>I add two spaces.</p>

    or this plugin look like it MIGHT allow for your custom css

    http://www.laptoptips.ca/projects/tinymce-advanced/

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘no paragraph tags!!’ is closed to new replies.