I've run into this issue many times, in many different software packages and websites, and was wondering what anyone else's thoughts were on the issue... I read this article from SitePoint, and one of the 'Bad Features' of many code/HTML editors was listed as follows:

WYSIWYG design view
Whilst WYSIWYG can be useful for novice developers, you will soon discover that hand-coding HTML and CSS is quicker than any design package. It can also be essential if your application requires DOM manipulation. If a WYSIWYG view is provided, make sure it doesn’t refactor your carefully-crafted code when you accidentally hit the ‘design’ button.

This site is running FCKEditor, which (typically) preserves any HTML source editing you make, and doesn't take out styles, classes, id's and such. However, I notice that TinyMCE and some other editors quite often hack at my code the second I switch back into visual editing mode.

What's your opinion on the matter? Take out source code editing altogether? Any perfect WYSIWYG solutions out there? FCK is pretty good, but it's sometimes slow, and can be rather clunky in some ways...