Yep, I know what you mean. From a UX perspective, double-clicking on a visual tag to turn it into the full, editable code as it was before would be the best solution. Then, when you come out of it (focus away, hit return, whatever) it goes back to the visual tag. How does that sound?