code: function hasBlock(regExp, state) {
    const { focusText } = state;
    const focusedText = focusText.text;
    return regExp.test(focusedText);
  }
docs: Has block selected
  
  @param regExp - match regexp
  @param state - editor state