WordPress.org

Support

Support » How-To and Troubleshooting » Keep HTML intact

Keep HTML intact

  • Hi,

    Does anyone know how to prevent the following happening:

    I find myself, more and more, using the HTML editor for posts and such in our WordPress site and when I insert something customised and then go to the Visual tab it strips out the HTML that i just added.

    For example I use the following to appear below a gallery of thumbnails and just above a subheading:

    <photoClick>CLICK IMAGES FOR LARGER VIEW</photoClick>

    This is tied to a css rule that makes the text size smaller than the rest of the text on the page and grey so that it does not interrupt the visitor’s reading of the page too much. Any time I go to the Visual tab, WordPress removes the <photoClick> tags and you have to redo them again before updating/publishing the page or post.

    Perhaps I am implementing the css rule in an incorrect manner.

    Ideally I would like to implement the instruction CLICK IMAGES FOR LARGER VIEW to the visitor by hardcoding it in the site to appear whenever a gallery is used. I have tried to find where and how this can be done but so far it looks a bit too complex. Inspect Element in my browser suggests that galleries are contained in a div named gallery-1 (TwentyTen theme) but I can’t find anything that equates to this in the WordPress files.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try using the CKEditor plugin to replace TinyMCE. It has a ‘Source’ mode that seems to be more ‘user friendly’.

    I find myself, more and more, using the HTML editor for posts and such in our WordPress site and when I insert something customised and then go to the Visual tab it strips out the HTML that i just added.

    Yeeaaah, don’t go back and forth. I know, that’s horrible but the switching gets eaten every time.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Keep HTML intact’ is closed to new replies.