WYSIWYG editors and disappearing HTML code


If you’ve ever worked with the WYSIWYG content editors in programs like WordPress, you may have noticed that funky things happen if you make changes to the HTML version of the content. In other words, if you switch from the live preview over to HTML mode to insert or modify something, portions of your code may disappear once you save or return to WYSIWYG mode.

Now, I understand that certain types of HTML markup need to be edited on the fly to remove invalid code or preserve a structure that the WYSIWYG editor can display. My complaint is that these programs never tell you when they’re performing silent edits that make your code disappear.

To resolve this issue, the WYSIWYG editor should keep a log of each time it deleted or modified your HTML code, and show some type of message to notify you about it. That way, the user won’t be surprised when their changes disappear, and they can review which code was rejected so they don’t do the same thing again in the future.