HcContributionForm submit is disabled by default replace all editor html tags

This commit is contained in:
senderfm 2019-07-04 17:14:02 +02:00
parent cb356161e5
commit 23cf309cfc

View File

@ -170,7 +170,12 @@ export default {
updateEditorContent(value) {
// this.form.content = value
this.disabled = true
if (value.replace(/<p>|<\/p>|<h3>|<\/h3>|<h4>|<\/h4>/gm, '').length > 3) {
if (
value.replace(
/<p>|<\/p>|<h3>|<\/h3>|<h4>|<\/h4>|<ul>|<\/ul>|<ol>|<\/ol>|<li>|<\/li>|<blockquote>|<\/blockquote>|<strong>|<\/strong>|<em>|<\/em>|<a.*>|<\/a>/gm,
'',
).length > 3
) {
this.disabled = false
}