Solution 1 :

const myInput = document.querySelector(".myInput");
const myTextarea = document.querySelector(".myTextarea");

myInput.value = "I'm an input value";
myTextarea.innerHTML = "I'm an textarea innerHTML";
<!DOCTYPE html>
<html lang="en">
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <input type="text" class="myInput">
  <textarea cols="20" rows="5" class="myTextarea"></textarea>

Problem :

Well, I have a program which uses a speechRecognition plugin from Ionic which takes listen and the result is put in an alert, it would be possible to put the resulting information in an input or a textarea, this is my code

import { Component } from '@angular/core';
import { SpeechRecognition } from '@ionic-native/speech-recognition/ngx'

  selector: 'app-voicetext',
  templateUrl: './',
  styleUrls: ['./'],

export class VoicetextPage {
  constructor( private speechRecognition: SpeechRecognition) {}
  startListening() {


Este es mi HTML

    <ion-title color="light">Voz a Texto</ion-title>



 <ion-card class="ion-padding-horizontal">

  rows="15" cols="20"