Apply the input rules (markdown) but also keep the tokens

You could fake them with :before style rules and such. But if you want to allow people to edit those characters directly, you might be better off building on top of something like CodeMirror