How to set bold text in UI Plugin?

Hey! I hope that someone can help me

I’m trying to make a Plugin that call components from my library and edit his text property

But I can’t get the font weight to change to bold. I was wondering how to make a RichText editor where the changes are instantly visible to the user

There are a plenty of plugins that make this, but the function document.execCommand is not working for me =(

I was trying this:

Texto da bolha Bold


<textarea class="textarea" rows="2" id="idTextoBolha">Texto da bolha</textarea>
<button id="bold_button">Bold</button>
  document.getElementById('bold_button').onclick = () => {

Text area has no formatting capabilities. You need to use “div contenteditable” for that