I've added a fix to point 3 over [here][1] (it's forked) It deals with `<kbd>[selected text]</kbd>` and `[<kbd>text</kbd>]`, where the `[]` denotes selection. It will not deal with wierd stuff like `<kb[d>text</kbd>]`. (Could be done using regexes) [1]: https://gist.github.com/2476992