• OK, I new to WP so maybe this is obvious.

    But as one who is used to using other visual-based HTML editors. I find that when I add a <div></div> in HTML mode and switch back to Visual then the damn thing is deleting all my tags!

    What is it up to? ??

    I can’t find anything in the WP FAQ about this bizarre behaviour.

    Can I switch it off?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Sorry – it can’t be switched off. If you use the HTML tab to add markup to a post (or page) and then switch to the Visual Editor to view the post at any point, you will lose some (if not all) of your markup.

    It’s been well-documented in this forum. I’d suggest choosing a tab and then sticking to it.

    Thread Starter quatermass

    (@quatermass)

    Can I ask then why it does this?

    Why does it need to remove code to do its ‘thing’.

    No other visual web editor does this.

    It should at the very least have a warning alert that it does this.

    Why isn’t it in the WP FAQ and how did the WP team think this was a good idea?

    Very bizarre behaviour.

    I was always under the assumption that this was the way that TinyMCE worked but I could be wrong.

    Thread Starter quatermass

    (@quatermass)

    I wasn’t….

    I know this isn’t a permanent solution – but:

    You can swap to “span” and use style=”display: block;” to mimic a div and wordpress won’t delete it.

    My “HR”:
    <span style="display: block; width: 80%; height: 1px; margin-left: 10%; border-bottom: 1px solid #eee;"></span>

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Switching to Visual loses my custom HTML tags’ is closed to new replies.