title: Is it possible to disable or control "commands" in contentEditable elements?
body: <p>As I understand it, an element with <code>contentEditable="true"</code> is some kind of WYSIWYG HTML editor. It generates relevant HTML tags corresponding to the command issued.</p>
  
  <p>For example, if one selects text and then presses <kbd>Ctrl</kbd>+<kbd>B</kbd>, the selected text is placed between <code>&lt;b&gt;&lt;/b&gt;</code> tags.</p>
  
  <p>I need to have no style tags in the resulting text. How does one suppress, hijack or control the behavior of those commands?</p>
  
  <p>Other things I could do:</p>
  
  <ul>
  <li>Filter out the tags after the fact; but then the user will think they have put things in bold when they really haven't</li>
  <li>Re-style the tags so that they don't show, and then filter them out; but there's a chance I might forget one, or that somehow the stylesheet is disabled</li>
  <li>Not use <code>contentEditable</code> at all but a <code>textarea</code> instead. But among other things, <code>contentEditable</code> makes it really easy to highlight the paragraph that is being edited. That's much more difficult to do with a <code>textarea</code>.</li>
  </ul>