let editorContents = this.template.querySelector("lightning-input-rich-text.myclass").value;
the above line returns null when the contents of the editor has just one word. After I type a space the above line seems to return the actual content.
This definitely is a bug. So, what's the workaround for getting the actual value of the rich text editor without asking users to type a space?
lightning-input-rich-text
element with all its attributes) and the complete event handler code to your question? With the most trivial setup (element hasclass
andonchange
handler) I can't reproduce the problem. My initial thought was that Salesforce forgot to declare thevalue
attribute as mandatory, but it works for me without it.