Not sure how to go about this one so hoping for some insight on options / ideas.
I have an HTML editor, all working good. Issue is this input must have a min / max count, problem is the char-count takes into account html tags so user enters hello = 5 char but the code is actually 12 characters when you add on the
<p>hello</p> // 12 charcters get counted though user only entered 5
So when testing I could just hit enter over and over creating empty
<p></p> tags until it hits the required min count, so in essence saving nothing of value
So how would one go about validating the stripped / user entered data, yet save the actual full HTML string?
// htmlString would be collected from the editor, just example here to show var htmlString= "<h1>Hello World</h1><p>This is the text that we should get.</p>"; var stripedHtml = htmlString.replace(/<[^>]+>/g, ''); // stripedHtml = Hello WorldThis is the text that we should get. = 47 characters with spaces
So if any ideas from vee-validate user that would be great or anyone at all