kindeditor验证不为空的方法

网上找的好多都不对,可能是kindeditor升级版本的事?

用RequiredFieldValidator肯定是不行的,需要验证两次。

用CustomValidator,然后定义一个js方法。

        function cvCheck(source, args) {
if (editor.count('text') == 0) { args.IsValid = false; } else { args.IsValid = true; } }

以上是判断字符数的。

如果要判断HTML共有多少个字符,就这样:

if (editor.count('html') == 0)
原文地址:https://www.cnblogs.com/liuxiuming/p/3119510.html