code: function queryCommandState(command) {
          var func;
  
          // Is hidden then return undefined
          if (editor.quirks.isHidden()) {
            return;
          }
  
          command = command.toLowerCase();
          if ((func = commands.state[command])) {
            return func(command);
          }
  
          // Browser commands
          try {
            return editor.getDoc().queryCommandState(command);
          } catch (ex) {
            // Fails sometimes see bug: 1896577
          }
  
          return false;
        }
docs: Queries the current state for a command for example if the current selection is "bold".
  
  @method queryCommandState
  @param {String} command Command to check the state of.
  @return {Boolean/Number} true/false if the selected contents is bold or not, -1 if it's not found.