• I am having trouble keeping HTML comments once I switch over to Visual mode from HTML mode in the editor. This happens when there is an empty line above the comment, like this:

    Phasellus dolor nulla, faucibus at aliquet eget, tincidunt at lacus.
    
    <!-- Comment -->

    My thought is that the editor is trying to wrap a p tag around the comment and realizing that the tag would be empty and throwing the tag away, along with the HTML comment.

    I know that the easiest answer would be not placing a blank line above the HTML comment but I have authors and getting them to do that all the time is really hard.

    How can I get around this? Is there anyway to remove the p tags and keep the comments?

Viewing 2 replies - 1 through 2 (of 2 total)
  • This is a known issue with the TinyMCE Visual Editor. The solution (for now) to to pick an editing tab and then stick to it. Do not switch editing tabs.

    Thread Starter lelandmcfarland

    (@lelandmcfarland)

    Well that stinks. Ok, I guess that means I move onto plan B. Thank you for the help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Visual editor is removing HTML comments’ is closed to new replies.