WordPress.org

Ready to get started?Download WordPress

Forums

Keep HTML intact (3 posts)

  1. vaughanprint
    Member
    Posted 1 year ago #

    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.

  2. vtxyzzy
    Member
    Posted 1 year ago #

    Try using the CKEditor plugin to replace TinyMCE. It has a 'Source' mode that seems to be more 'user friendly'.

  3. 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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.