Further to Ben's comment: I'd say that your advisor has burned bridges with you, which is unfortunate. There is a lesson in this for doctoral students. Choosing an advisor is a life-altering decision. Personal compatibility and reputation are as important as professional reputation.
The filial obligations run in both directions: whatever you do in your field will reflect in some degree on your advisor. It's in your advisor's interest to help you along professionally. It is unfortunate that your advisor has chosen to take this sort of action. He (She?) apparently wants the hit in an "A" journal.
What can the editor do? Anything she wants to do, actually. You don't say if the paper is in print yet. The best case for you is that it is not in print yet. Adding your advisor as co-author is still possible, and this whole mess can remain relatively closely held to you, your advisor and the editor. If the paper has appeared already, the editor could do anything from withdrawing the paper (very bad, as that action reeks of plagiarism or other academic dishonesty) to issuing a corrigendum note (not as bad as withdrawing the paper, but bad). In the short run, the best case for you would be for the editor to do nothing. I'm not sure that is in your long-run best interest, however.
What should you do? Someone has to be the bigger, better person. Your advisor has already (to the extent that your version of the story reflects the actual history) revealed him(her?)self to be a rather petty person. I'd say to add your advisor as co-author. The power dynamics are pretty asymmetric here and you are on the weak side. Unless you care to go to your University's research ethics system with a complaint (and you'd better have irrefutable proof the situation is precisely as you say if you choose this route) and ruin your advisor's career, there isn't much you can do. Whistleblowers often do not fare well.