【问题标题】:How to integrate ck-editor with jquery validate?如何将 ck-editor 与 jquery validate 集成?
【发布时间】:2012-07-13 01:51:45
【问题描述】:

我想将 CK-editor 与 jquery validate 集成,但它不起作用。

$("#commentForm").validate({
        rules: {
            txtckeditor: "required",
        },
        messages: {
            txtckeditor: "This field is required.",
          onkeyup: false,
        onblur: true
});

如何解决这个问题?

【问题讨论】:

    标签: php editor ckeditor


    【解决方案1】:

    在调用验证之前尝试类似:

    CKEDITOR.instances.txtckeditor.updateElement(); // then your validate call
    $("#commentForm").validate({
            rules: {
                     ....
    

    【讨论】:

      猜你喜欢
      • 2017-10-28
      • 1970-01-01
      • 2021-10-24
      • 2021-10-11
      • 2020-05-30
      • 1970-01-01
      • 1970-01-01
      • 2021-09-22
      • 1970-01-01
      相关资源
      最近更新 更多