WordPress Editor Deleting Underline
-
When I add “underline” to text via the WordPress Page Editor, it removes this effect during editing.
I’m not sure if it’s when I press “update/publish” or at another time during my editing process. I’ll try to update this if I can figure out exactly what triggers the removal.
-
Maybe your CSS is overriding it. Any chance to get a link to the page and tell me what word is supposed to be underlined?
http://ipwn.com/members/wow-guides/wow-gold-guide/the-basics/
This is the 3rd site I’ve had it happen to…
We can’t access that page… You need to also specify which element you added the underline to.
Woops, I forgot to update it after I removed protection. Should be good now. I’m adding the underline to the text on the page.
Are you adding it to the whole text? Can you just pick 1 word?
Also are you using visual or html? If you do visual and swap to html do you see the coded added or removed?
I can’t find anything that suggests CSS is overriding your underline, as there are no traces of underlined HTML elements.
Are you adding the underline by selecting a button in the Visual editor? If so, what does that underline show as in the HTML editor?Also I would be curious to see if you swapped to HTML mode and added this in.
Welcome to WordPress. <span style="text-decoration: underline;">This is your first post.</span> Edit or delete it, then start blogging!I don’t think my original post was clear…
I add underline by pressing the visual editor underline button. Sometimes during editing, sometimes after I press the publish/update button I notice that (in the editor side) it completely removes the underline, obviously it removes it from the published post to at this time.
While doing this, I was always in the Visual side, and not on the Text/Html side, and I didn’t switch back and forth.
@aaron, I added your line…
I’m trying to mess around with it so I can duplicate the problem I have. But I’m not sure exactly what triggers the editor to remove the underline.
Okay! I think I figured it out where the problem happens…
I added a new paragraph, and pressed backspace a few times, and it removed all the underlines. In both mine (added with the editor) and Aaron’s added in the HTML side.
So you’re good? 🙂
No… I’ve just found where the problem comes from.
When I’m in the editor and I have some text underlined… if I create a new paragraph and press my backspace.. it removes all the underlined text.
This is what sounds like is going on:
You write a paragraph and this goes on behind the scenes;<p>My first paragraph written</p>Then you write another paragraph and you underline it, so this happens;
<p><u>My second paragraph</u></p>Then you press enter and the code ends up with this
<p><u>My second paragraph</u></p> <p><u>So if you press backspace, you are deleting the
<u>element. After you’re done typing, WordPress should write</u></p>but that’s not important here.I think this is what’s happening because WordPress strives to create valid HTML.
Valid HTML is this;<p><u> ... </u></p> <p><u> ... </u></p>Invalid HTML is this;
<p><u> ... </p> <p> ... </u></p>I’m not sure… When I look at the text side it’s using:
<span style="text-decoration: underline;">text here</span>And this happens if I do it in the middle of a paragraph that’s already been written… and then move to a completely different area of the page and press enter, then backspace.
Any ideas on how to get this fixed?
The topic ‘WordPress Editor Deleting Underline’ is closed to new replies.