• I am entering HTML in the HTML view, but when I return to edit my entries – the code is being stripped out if the view gets changed to the ‘normal’ view… Is there a setting to correct this?

Viewing 6 replies - 1 through 6 (of 6 total)
  • No. Once you have edited a post in the HTML tab, you must tick to the HTML tab when re-editing that post.

    That’s not completely true. There is lots of code that you can use in HTML mode that will not get stripped out if you switch to Visual mode. There is also lots of code that the editor will strip out though, and apparently even just looking at the page or post in Visual mode will wipe it out. For these kinds of pages I usually save a backup that I edit with HomeSite and paste in as HTML. That way if your code ever does get wiped at least you have your backup to paste back in.

    There is lots of code that you can use in HTML mode that will not get stripped out if you switch to Visual mode

    Really? Have you managed to pin down what is, or isn’t, removed?

    I know some things that don’t get stripped out like <div> tags with onboard style attributes, tables, image search tags, image style attributes, and anchor tags.

    I also know some things that do get stripped out, like image maps, some embedded forms, waveover code.

    I don’t have a definitive list of what does or does not get removed but it’s easy to make a backup of your code so you have some recourse if you are trying something fancy.

    Thread Starter simoncarr

    (@simoncarr)

    Hmm… Really wish there was a way to switch between the modes without losing HTML content. Maybe in a future version of WP?…

    It’s really the TinyMCE editor that does it. You can disable the Visual editor but this can be a problem, especially if you need people who don’t know code to be able to edit the content.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Switching between normal view and HTML view’ is closed to new replies.