Answer the question
In order to leave comments, you need to log in
In JS check for characters between certain tags?
I'm trying to use JS to check that the text message being sent is not empty.
Since I use the TinyMCE editor, it is html that needs to be checked, and not just text.
If text, then everything is simple:
const text = editor.getContent({format: 'text'}).replace(/\s+/g,' ').trim();
if(text === '' || !text) {
return false;
}
<iframe>, <video>, <audio>
<div>
<div> ...message... </div>
<div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question