I've always been impressed with this guy's clever use of the
tag:
http://bost.ocks.org/mike/bar/
it's really nice because the aside comes right before the element you want it to sit next to (he uses some simple, clever css to do the positioning).
I guess the challenges with a markdown editor are:
chunking your raw text into sections that correspond to the outermost tags from the markdown renderer
preserving the editor-like qualities of the raw text editor (I.e. making sure you can move your cursor around the entire raw editor despite the fact that you might be chunking the text in certain ways.