title: How to set On Off state for CKEditor custom button
body: <p>I have added a custom plugin to CKEditor inline to perform bold operation. The plugin is working as expected but the on/off state of button is not working. </p>
  
  <p>When command is executed its state is always <code>TRISTATE_OFF</code>.</p>
  
  <pre><code>CKEDITOR.plugins.add( 'customBold', {
      requires: 'toolbar',
      icons: 'bold',
      hidpi: false, 
      init: function( editor ) {
  
  
          var boldCommand = {
              exec: function( editor ) {  
                  document.execCommand('bold', false, null);              
              }
          }
  
          editor.addCommand( 'bold', boldCommand );   
  
          editor.ui.addButton &amp;&amp; editor.ui.addButton( 'Bold', {
                  label:  'bold',
                  command: 'bold',
                  toolbar: 'basic,10'
          });    
  
         editor.setKeystroke( [
              [ CKEDITOR.CTRL + 66 /*B*/, 'bold' ]                
         ]);
      }
  });
  </code></pre>
  
  <p>When user selects the bold text I would like to toggle the bold style in toolbar.</p>