0
I’m trying to check if a textarea has valid text. Checking the space was easy, but the enter I don’t know how to check.
enviar() {
    var num = 13; // 13 é o cód ascii do enter
    if (this.textoEmEdicao == '' || this.textoEmEdicao === " ") { // verifico se o texto é nulo ou tem espaço
      this.textoEmEdicao = '';// setar a textbox para nenhum texto
    } else {
      let mensagem = {
        texto: this.textoEmEdicao,
        data: new Date(),
        contato: this.emissor
      }
      this.adicionarMensagem(mensagem);
      this.textoEmEdicao = '';
    }
}
I believe that the question is not to block Enter. You want to block Enter for what reason? What this function
enviar()ago?– Sam