code: function(command, commandValue) {
      var obj     = wysihtml5.commands[command],
          args    = wysihtml5.lang.array(arguments).get(),
          method  = obj && obj.state;
      if (method) {
        args.unshift(this.composer);
        return method.apply(obj, args);
      } else {
        try {
          // try/catch for buggy firefox
          return this.doc.queryCommandState(command);
        } catch(e) {
          return false;
        }
      }
    }
docs: Check whether the current command is active
  If the caret is within a bold text, then calling this with command "bold" should return true
  
  @param {String} command The command string which to check (eg. "bold", "italic", "insertUnorderedList")
  @param {String} [commandValue] The command value parameter (eg. for "insertImage" the image src)
  @return {Boolean} Whether the command is active
  @example
  var isCurrentSelectionBold = commands.state("bold");