The TEXT editor is the same as the old HTML editor – it was just renamed.
If you switch to the visual editor, that WILL strip code, but that’s not new.
OK. Cool. It’s new for me. On 3.3, I could do that stuff. On 3.6, I can’t. I’m guessing you’re correct because it looks like people have been complaining about that for years. Do you know any ways around that editor problem? I hate the thought of being stuck in the text editor only and losing all my work if I ever click “visual”. No plugin suggestions, please. Plugins are not immortal. People die and people stop updating plugins, and they will ruin your site as soon as they stop updating the plugin. Maybe there’s some code I can use to fix this. Thanks.
I think what WPyogi means is that if you enter html in the Visual editor, then it will strip out html.
But if you enter html in the Text editor, then it will NOT strip out html.
I do this all the time – enter html in the Text editor and then the output of the html is shown in the Visual editor.
OK. When you enter anything into the text editor, your code will disappear if you ever click on the visual editor ever again. That’s been my experience. You can spend hours coding. As soon as you click on that visual editor, you lose hours of work. Next time you click, “publish”, that work is gone. Is there any way to edit wordpress, with CSS or whatnot, to prevent this?
Yep, that’s true – and I don’t know of a way to change it – it’s a known problem. I’ve heard the senior WP devs tell people to simply avoid switching editors.
Ok sorry that I have misunderstood how this works.
I thought I had entered html in the text editor many times but maybe that was while I was at a pub 🙂
Just to make sure I am not misunderstanding anything I did the following test:
Created a new page
View the Text editor
Pasted in:
<a href="http://www.w3schools.com/">Visit W3Schools</a>
Published the page.
Viewed the page – link looks good.
Edit the page.
Switched to Visual editor.
Link is shown.
Switch to Text
html is shown.
Switched to Visual editor.
Link is shown.
Seems to work fine for me and this is what I meant when I said it works ok.
R u guys talking about something else?
Maybe do a Save/Publish 1st before switching to Visual?
wpfan100, I was doing just fine with that with WP 3.3.1 or something like that. I’m on 3.6 now and it won’t even allow a simple G+ button with an “a” tag. However, here’s a fix that someone posted. The only problem on my end is that I have no clue where to put the code he mentions. http://www.engfers.com/2008/10/16/how-to-allow-stripped-element-attributes-in-wordpress-tinymce-editor/