WordPress.org

Ready to get started?Download WordPress

Forums

Why auto_p? (30 posts)

  1. MACscr
    Member
    Posted 5 years ago #

    Why does wp add paragraph tags on output versus input? If the visual editor added them when content was being written, a user could just switch to the html version (code view) and switch in between without the data being screwed up. Right now its not possible.

    Even if I disabled auto_p, I would then have to manually add them even when using the visual editor. Sometimes i want to use the editor, sometimes i want to use code view so i have 100% control. Heck, if I aded them in the code view, saved the post, reopened, made a few changes in the editor version, then saved again. I would have lost all my paragraphing.

    Seems so ass backwards. What is the through process behind this? I know tinymce doesnt work this way be default.

  2. MACscr
    Member
    Posted 5 years ago #

    No one has an opinion on this?

  3. The reasons list is very long, but basically it's because it makes it the easiest for everyone involved (you, devs, plugin authors, etc.). WordPress stores the post the way you write it.

    I don't want to stare at <p>'s or <br />'s while I'm editing a post. I want to look at what I wrote.

    Some people also disable wpautop() and replace it with like Texturize or other markups.

    Very few things are done to content on the way into the database.

  4. MACscr
    Member
    Posted 5 years ago #

    What? If you use the visual editor, it inserts strong tags, lists, link tags, etc, etc. If i want to use use the visual editor to do paragraphs, i should have that as an option as well.

    I understand WP wants the users to have as many options as possible, so why remove this option if i want it? I dont want a different editor, i just want TinyMCE to work as it was originally intended. =/

  5. MACscr
    Member
    Posted 5 years ago #

    So there is absolutely no way to use the Visual Editor and have it insert the <p> tags?

    I find it funny that you say you dont want to stare at <p>'s or 's, but you have no problems staring at <strong>, <h3>, <span>, etc. Doesnt make sense. Also, if your using the visual editor you wouldnt see any of that. The code view should be the "source" view IMHO.

  6. Saberj
    Member
    Posted 5 years ago #

    WordPress definitely does not store the post the way you write it. It butchers the crap out of your post. Changes your HTML, removes extra lines, displays it completely differently from the way it will end up on the site, etc. I'm with MACsr on this one. At the very least, there needs to be options involved.

  7. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    Actually, WordPress stores exactly what you send it. It modifies it on the display-time, not on the write-time.

    That said, certain types of HTML will be removed by kses and such, unless you're the admin. Admins and editors get unfiltered-html capability, normal authors do not.

  8. Saberj
    Member
    Posted 5 years ago #

    That's pretty bizarre. I've never been able to get things like multiple lines between content to stick by either editing visually or via HTML. Save it, switch between the editors, etc. Every single time, it goes back to only having a single line between content.

    Now, if I install Dean's FCKEditor plugin, I can edit the text how I want it, and it stays just fine. This comes from an administrator user, Windows XP, Firefox 3.0.4, and WordPress 2.6.3

    I'll give it another test with 2.7, but I'm not sure why I have such different results than you guys say.

  9. Saberj
    Member
    Posted 5 years ago #

    ...nope, still doesn't care.

    http://www.geekshow.us/newdev/content/articles/testing-spaces/

    That post is supposed to have multiple spaces between each line. However, as you can see, there is a uniform one space between each line. I tried hitting enter multiple times in the visual editor. That didn't work, so I went to the HTML view, and tried entering multiple break tags. That also didn't work at all. Still exactly the same.

    Unless we are all on different pages as to what we are discussing, it's definitely not working as you say it should be. But again, if I was using Dean's editor plugin, I'd be getting exactly what I typed in.

  10. ClaytonJames
    Member
    Posted 5 years ago #

    Body{
    color:#3A2F27;
    font-family:Verdana,Arial,Helvetica,sans-serif;
    font-size:12px;
    font-size-adjust:none;
    font-style:normal;
    font-variant:normal;
    font-weight:400;
    line-height:20px;

    What happens when you try this: <p>1 space</p> <br /> in the HTML editor, save the changes, and then preview the post - not in the visual editor- but in the preview pane? Bouncing between HTML and Visual has always yielded strange changes for me. I guess I'm just used to the HTML mode.

  11. ClaytonJames
    Member
    Posted 5 years ago #

    Oh, sweet irony. I had to edit that last post 3 times before it would print the break!!

    :-)
    .... Laughing on the inside, really I am!

  12. Saberj
    Member
    Posted 5 years ago #

    Well, it doesn't do a whole lot of anything, considering there is nothing after the "1 space" line in what you told me to type. But I'm going to assume you meant to try that code in the HTML with the rest of what I typed before.

    In that case I typed:

    http://img228.imageshack.us/img228/2552/testsstartsy6.jpg

    And the preview pane displays:

    http://img67.imageshack.us/img67/9423/testresultsew7.jpg

    It's very odd, I think. I wouldn't expect those results at all...

  13. ClaytonJames
    Member
    Posted 5 years ago #

    But I'm going to assume you meant to try that code in the HTML with the rest of what I typed before.

    You assumed correctly. I just phrased it poorly.
    It does look odd, doesn't it. One might expect with those breaks, to see spacing of what... 40,60 and 80px respectively? Your css dictates a default line space of 20px, so I would think that would be the case. In fact when I visit that page and add the breaks using firebug;

    <p>Testing</p>
    <p>1 Space</p>
    <br />
    <p>2 Spaces</p>
    <br />
    <br />
    <p>3 Spaces</p>
    <br />
    <br />
    <br />
    <p>4 Spaces</p>

    that is exactly what I see happen. One break, 40px space, two breaks, 60px space, etc...

    Odd indeed.

  14. Saberj
    Member
    Posted 5 years ago #

    BTW, I'm replicating this on my current version of WordPress (2.7 RC1) with that theme. However, it was also the case on 2.6 with my old theme. And 2.5 as well. I've never been able to get WordPress to treat spaces right.

    I've read all the suggestions about using enter vs ctrl-enter, or shift-enter, or whatever it is. I've also read the posts about disabling auto-p, and tried that. Still, the only thing that ever works right is Dean's plugin. Which is a shame, because I'm actually not too fond of that editor.

    Luckily, it's rare that I need to add multiple lines in. But it happens occasionally.

  15. Saberj
    Member
    Posted 5 years ago #

    http://img224.imageshack.us/img224/7990/firebugni7.jpg

    There is what I'm seeing in Firebug from that last post. All my breaks are gone, replaced with paragraph tags. You can see why there is randomly two spaces instead of one. Those have an extra paragraph tag in there. Again, very odd. But definitely not what I consider "Admins and editors get unfiltered-html capability".

    But then I guess Otto did say that it is modified at display time. So while I consider that a huge problem, that's probably working as intended.

  16. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    That's pretty bizarre. I've never been able to get things like multiple lines between content to stick by either editing visually or via HTML.

    That's intentional. The autop function removes multiple blank lines.

    If you want extra vertical space, then modify the CSS appropriately. That's the correct semantic way to do it.

  17. Saberj
    Member
    Posted 5 years ago #

    Modify the CSS for each individual post? The vertical space is set correctly for normal situations. But when you use your blog for more than typical posts, that's not always feasible to do.

    Pages are a good example. My site has an "About Us" page that lists the admin, tells a little about them, etc. I want to be able to space each individual out properly. However, when the blog is going in behind you and deleting the spaces, that doesn't work right.

    This has always been one of the biggest flaws of wordpress for me, and from what I've seen, several other people as well. When you do something in your visual editor, you expect the system to keep it in place. If we wanted it to delete our extra lines, we wouldn't have put them there to begin with.

    At the very least, these automatic correction "features" should be optional. I imagine most people probably want control over how things work on their blog. Whether or not they ever need that much control is another thing altogether.

  18. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    Modify the CSS for each individual post?

    No, create a specific case for where you need that extra vertical space and use the proper class for it at that point.

    Content is not presentation. Your content does not always show up on your webpage. What about your readers who subscribe to your feed? What do they see? What do you want them to see? A bunch of empty lines with no styling? That doesn't sound like a good user experience to me.

    Pages are a good example.

    Pages are a good example for my case, actually. Because pages are usually static content with one-time cases. That's why Page Templates exist.

    Your "About Us" page should have a specific design and template for its presentation, since it is different than everything else on your site. It's a special case, and every system needs a way to handle special cases.

  19. Saberj
    Member
    Posted 5 years ago #

    I'm really just barely able to modify the theme I have. When I get too deep into php and css, things get sticky. I can understand the reasons why this standard rule exists. But options truly are never a bad idea.

    Creating a page template is probably not something I could comfortably do. And anyone that is less skilled at that than even I am probably wouldn't be able to do it at all.

    Simple is a motto that WordPress sticks pretty close to. But I've had several of my authors that just want a post/page/whatever to do what they tell it to do. I honestly wouldn't even know where to begin in creating a page template that tells the page to display vertical space as it was typed in the WYSIWYG editor. Is there a function for that raw form of display? Anything that would help anyone but the most skilled php coders?

    In any case, thank you for clarifying all this. While I still don't necessarily agree with the inability to do what I need out of the box, I can at least understand why these restraints are in place. I'm just a big believer in freedom. If I told WordPress to put in an extra space, I probably wanted it there. My favorite is when a left-justified image causes problems for other things on the page, such as an embedded video. If that video was one or two lines lower, it would be fine. But as it stands, you have to decide on typing filler text, or dealing with the fact that your page looks ugly because your video is "stuck" to your image.

  20. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    If I told WordPress to put in an extra space, I probably wanted it there.

    You'd be surprised at how often people put things in that they really don't want to be there. It's the most common case, actually.

    Think of it like this: You have a website. It has a bunch of authors (instead of just you). These authors put in a bunch of posts and such, but you control the site. You control the layout of the site. Do you really want your authors to be able to screw up your layout by simply making posts? Would you want them to be able to choose different fonts? That would make your webpage really chaotic looking, no?

    A dynamic web page is not like a word processor. It does not make pages for printing or display, it mixes content and presentation from different sources. Your content can come from several places, and your presentation can be in multiple forms at the same time, depending on the viewer. So the content has to be filtered, somewhat, to be just the content itself. People are used to word processors, and they put in formatting that often should not be there.

  21. intended
    Member
    Posted 5 years ago #

    had this same issue, was a stupid plugin - running 2.7

  22. curmudgeon61
    Member
    Posted 5 years ago #

    The reasons list is very long, but basically it's because it makes it the easiest for everyone involved (you, devs, plugin authors, etc.). WordPress stores the post the way you write it.

    I don't want to stare at <p>'s or <br />'s while I'm editing a post. I want to look at what I wrote.

    I'm sorry, but IMHO removing extra blank lines is certainly not easier for my novice client (the editor) or for me the developer. WP is making the assumption that I really don't want that extra line when I really do want that line.

    No, create a specific case for where you need that extra vertical space and use the proper class for it at that point.

    Sometimes the editor that just wants to add an extra line or two of white space. Why on earth should they have to know how to apply a special CSS class to a paragraph - regardless of page or post? I don't want them using the html editor and they don't want to use it either.

    auto_p I can live with - although it's a bit irrational for other tags to be visible but not <p> or <br /> - but it's workable. Removing my blank lines is unacceptable. WP is editing my content for me.

    BTW - for those who are interested. A workaround for this is to enter the html editor and insert <p>&nbsp;</p> in place of the extra blank line you have added. Then save.

    I would really like to see the WP folks reconsider this issue and make the removal of extra blank lines an option.

    Thanks

  23. curmudgeon61
    Member
    Posted 5 years ago #

    BTW - even this ..

    <p>&nbsp;</p>

    ..does not work if someone subsequently edits the page/post in visual mode. It disappears again.

    Annoying .. really.

  24. nick_nielsen
    Member
    Posted 5 years ago #

    I am sick to death of the auto correction !!!
    I use static pages a lot on my site which are VERY code dependant to work. Every time I save the page the HTML is screwed up.

    Not only is it screwed up but the HTML no longer validates as the corrections are wrong - tags uncompleted etc.

    It should be possible for the editor to distinguish between what is done in the WYSIWYG editor, which should be automatic and what is is done in the HTML code editor which is intentional and, it must be presumed, being done by a competent person.

    The question of multiple authors is, of course a problem but then the option should be to TURN OFF the code editor to those who do not have rights, not to stop people who use code from editing it.

    It's almost enough to make me go looking for something else !

  25. gian-ava
    Member
    Posted 5 years ago #

    Hi!

    Since I've been very sensible to the auto formatting problem (I couldn't believe that one huge problem with WP could be about what is primarly meant for: writing), here is one thing I am going to try:

    http://wordpress.org/extend/plugins/ps-disable-auto-formatting/

    This plugin shoul ddisable the annoying auto fromatting.

    I say "should", because I just gave it a look, and it seems to do the job.

    I was actually running the Dean's FCKEditor plugin as well, but it bothers me because of the different look whith the rest of the interface (oh, these designers!!!).

    Anyway, let me know what you think about the plugin. it could really be the missing option that WP doesn't seem to give us.

    ;-)

  26. nick_nielsen
    Member
    Posted 5 years ago #

    Thanks for the info - I've been using Headspace 2 - site wide tab auto formatting, and WP unformatted
    I think I'll give your suggestion a whirl - seems more flexible than WP unformatted.
    I gave up on FCKEditor too - you use certain functionalities like NextGen button and the like.

  27. curmudgeon61
    Member
    Posted 5 years ago #

    I gave up on Dean's FCKEditor too. It created as many problems as it solved.

    We really need a button to turn off auto formatting. ModX has it.

    Please put this into WordPress!

  28. inorganik
    Member
    Posted 5 years ago #

    I was just about the post a new thread, and here it was, at the top of the list. I embrace the auto <p>tag. But why on Jah's green earth can't we decide to omit it in html view?? That's where I'm stumped.

    This is frustrating, because when I insert an image into my post, I don't want it wrapped in a p tag.

    The reason is, the image will then pick up my p tag hover properties (in Firefox), Which looks janky (a dotted underline when you hover, pushing everything below the image down when you hover over it). Even with special classes applied to the image, I can't stop the hover, because its applied to the p tag.

  29. webmind
    Member
    Posted 4 years ago #

    Why do people keep defending the way WordPress butchers code and pretend that it doesn't? No wonder nothing ever gets fixed in this terrible editor.

    I am trying to edit a simple post, and every time I switch to html view and back, my post has completely changed and everything is a mess.

    Not only that, I can't get things to appear in preview or after posting the way they appear in the visual editor I create in the first place. What junk.

    A pity they refuse to just fix the stupid thing.

  30. The short solution is this: Don't switch. Pick visual or html editor and stick with it.

    And you're right, it's not a true WYSIWYG editor, but it's both onerous and nigh impossible to make one that works without putting a lot of junk in your HTML. There isn't a single one on the entire internet that fulfills every need that people have for a visual editor. Yet.

    Not only that, I can't get things to appear in preview or after posting the way they appear in the visual editor I create in the first place.

    That may be due to your CSS in your theme, but without specific examples (and probably actually looking at your site) no one can help you there.

Topic Closed

This topic has been closed to new replies.

About this Topic