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 committed by Matt Rider
parent f057205158
commit 55ce9c1afb

View File

@ -177,7 +177,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
}