title: Apply class to button which execCommand on contentEditable div
body: <p>Is there a built in way of keeping a button active when it execute a execCommand on a content editable div ?</p>
  
  <p>example :</p>
  
  <pre><code>&lt;input type="button" onclick="doRichEditCommand('bold');" value="B"/&gt;
  
  function doRichEditCommand(command){
      document.execCommand(command, null, false);
  }
  </code></pre>
  
  <p>I'd like my button to remain active when the carret is within something where <code>document.execCommand(command, null, false);</code> has been applied. I suppose it's doable by checking the parent elements but if there is a built in way it would be better.</p>
  
  <p>In other words I'd like my bold button to be orange when the carret is somewhere which should be bold.</p>