tinyMCE jQuery表单验证 [英] tinyMCE jQuery form validation

查看:154
本文介绍了tinyMCE jQuery表单验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用tinymce的getContent()制定自定义验证规则,如何通过jquery验证来做到这一点?我需要将规则应用于使用tinymce格式化的文本区域.

I'm trying to use tinymce's getContent() to make a custom validation rule, how can I do this with jquery validation? I need to apply the rule to a textarea formatted with tinymce.

验证: http://bassistance.de/jquery-plugins/jquery-plugin -validation/

$("#element").click( function(e) {

    console.log(tinyMCE.activeEditor.getContent());

    $("#someForm").validate({
        rules: {        
            title: {
                required: true
            }
        }
    });

});

我正在考虑仅对getContent()使用少量的javascript,因为看起来需要付出很多努力来创建一种解决方法,以使jquery验证与tinymce一起工作.对可能的解决方案有何想法?

I'm thinking of just using a little bit of javascript with getContent() because it looks like there's just as much effort creating a workaround to get jquery validation working with tinymce. Thoughts on possible solutions?

推荐答案

以下stackoverflow问题应该可以帮助您解决该问题:

The following stackoverflow questions should help you on that issue:

带有TinyMCE字段的jQuery验证表单,该表单通过空值不给出错误

这篇关于tinyMCE jQuery表单验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆