Fixed length check, check length after pasted content is cleaned.

This commit is contained in:
Martin Edenhofer 2015-12-29 15:25:10 +01:00
parent a2527423af
commit e42a4a750a

View file

@ -112,10 +112,6 @@
}
_this.log('paste', docType, text)
if (!_this.maxLengthOk(text.length)) {
return
}
if (docType == 'html') {
text = '<div>' + text + '</div>' // to prevent multible dom object. we need it at level 0
if (_this.options.mode === 'textonly') {
@ -146,6 +142,10 @@
_this.log('text2html', text)
}
if (!_this.maxLengthOk(text.length)) {
return
}
// cleanup
text = App.Utils.removeEmptyLines(text)
_this.log('insert', text)
@ -201,6 +201,7 @@
}
this.log('maxLengthOk', length, this.options.maxlength)
if ( length > this.options.maxlength ) {
this.log('maxLengthOk, text too long')
// try to set error on framework form
var parent = this.$element.parent().parent()