You can use the WordPress editor in Visual or HTML mode. I often use the HTML mode for HTML or JavaScript snippets from other websites, such as when embedding widgets or video clips. Everything works fine until you switch the editor back to Visual mode and save the post or page; then WordPress often garbles the code, breaking it.
The best solution I've found is the Always Edit In HTML plugin. It gives you a checkbox on every post/page, allowing you to force that post/page to always use the HTML editor.
Always a sad moment when a good snippet/embed gets destroyed, but I hope the long-term solution comes from WordPress core. Funny, my wife actually prefers to do all of her blogging in HTML view, but I prefer to see the format and links as I write even though I am the code nerd.