• This is driving my nuts. I cant save html code. It just gets deleted after I hit the visual button.

    I write for a site and need to send my posts to the admin for any other edits. When he edits it, my html is removed once he hits the visual tab.

    Is there anything I can do about this?

    And are they planning to fix this big glitch?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator James Huff

    (@macmanx)

    Is there anything I can do about this?

    Unfortunately, no. TinyMCE (the third-party script used for the visual editor) basically strips out code that it isn’t programmed to recognize. For now, I recommend composing the post in the Visual tab, then switch to the HTML tab to add your code, then publish the post.

    Alternatively, you could just do everything in the HTML editor.

    And are they planning to fix this big glitch?

    The last I heard, the WP devs were working on their own WYSIWYG editor, which should resolve this issue.

    I’ve been having the same problem in both WordPress 2.9.2 and 3.0.1. Today, I discovered that using the “shortcut” <br clear=”both”> was causing the problem. When I replaced all my <br clear=”both”> with <br style=”clear: both;” /> I was then able to switch from The “HTML” tab to the “Visual” tab when I’m editing a page with no problems. This one was driving me crazy as well – hope this saves someone else from going insane!

    Thanks wpdavid for this tip …yes it was driving me crazy as well.

    In general, there’s alot of talk on the web about modifying TinyMCE’s list of “extended_valid_elements” so that it doesn’t remove all of these otherwise fully legal elements but I haven’t been able to find out where (in TinyMCE code) that array is defined.

    Unfortunately, no. TinyMCE (the third-party script used for the visual editor) basically strips out code that it isn’t programmed to recognize.

    I have raised this issue over at the TinyMCE forum and they are saying that it is an issue with WordPress’s specific implementation of TinyMCE …and that it is not a native TinyMCE problem at all:

    https://tinymce.moxiecode.com/forum/viewtopic.php?pid=85157#p85157

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Why does my html code delete itself after hitting the visual button?’ is closed to new replies.