title: Toggle any tag just like execCommand bold does with b
body: <p>I have contenteditable div and need to be able to wrap/unwrap text into other tags like <code>&lt;code&gt;</code> and so on.
  Wrapping them isn't problem, rather unwrapping selected text is, like when there is <code>&lt;b&gt;hello &lt;/b&gt;&lt;code&gt;world&lt;/code&gt;</code> and I need to unwrap only letters in middle (orl), there doesn't seem to be simple way detect if selected text is inside <code>&lt;code&gt;</code> tag or no. So while <code>document.execCommand("bold")</code> does this wrapping/unwrapping job perfectly with <code>&lt;b&gt;</code> and <code>&lt;i&gt;</code> tags, is there any way to do same with other tags except b, i, u?</p>