Visual editing stripping out <p> tags
-
I’m getting really irritated by the way the Visual Editor strips out paragraph tags, and otherwise messes with the vertical spacing in posts. Just switching to the Visual tab is enough to strip out any paragraph tags and/or reformats the vertical space. My latest post (http://sethlakeman.wordpress.com/2009/01/29/related-artists-news/) is particularly vulnerable because used HR tags to split it more clearly into sections. Every time I switch from Visual <-> HTML I have to clean up all the spacing again. If I purely stick with the HTML option it’s fine.
I find the visual editor useful for drafting and quick revisions. I don’t really want to disable it completely. Is this a bug that’s likely to get fixed, or is it some (in my opinion rather misguided) intentional “feature”?
I’m using Firefox 3 on WinXP, if that’s an issue.
The blog I need help with is: (visible only to logged in users)
-
I’m afraid that with the visual editor it seems to always put in the extra lines between things, which part of the HTML definition of the P tag, so you are going to have to write things like the following if you want to keep the formatting I see in that post, and stay away from the visual editor. The below produces the effect you want. Notice that it is like one long paragraph with the HR inserted inline. According to W3C, that is the proper use of it.
Quick round up of news of projects from Seth's extended family, band members and former support acts. If I've missed anything or anyone out, leave a comment.<hr />Sister-in-law Cara Dillon has a new album out, Hill of Thieves, which features Seth on Vocals, tenor guitar and fiddle on the track Spencer the Rover. More in the Hill of Thieves post.<hr />Long-standing bassist Ben Nicholls... -
I forgot to mention the most important thing. With formatting like what is in your post, you will have to stay away from the visual editor.
You might check out one of the offline blog editors such as Windows Live Writer or BlogDesk (both for windows and free) or Ecto, or Mac (less that $20). They might be far more forgiving with this type of formatting.
-
Hi sacredpath,
Thanks for posting. I was worried the answer was “disable the visual editor completely and use something else to write/edit posts if you want wysiwyg convenience + sensible code editing”. I actually have Dreamweaver, but I’d been hoping to be able to do this within WP rather than cutting/pasting posts all the time. I’ll have a look into the blog editors, as they may be a good compromise and let me write/edit through a single interface, which is what I’m after.
Cheers,
Sophie -
Sophie,
WordPress really should not strip this stuff out when you go from the HTML editor to the visual editor, and I might suggest contacting staff directly via the help/support tab. You might want to include a link to this forum thread as well.
-
-
@gabimoore, that solution does not work here at wordpress.COM because we cannot change any of the PHP or underlying files. We do not have access to them.
- The topic ‘Visual editing stripping out <p> tags’ is closed to new replies.