How can i get content of CKEditor using JQuery?

前端 未结 15 1795
甜味超标
甜味超标 2020-12-04 15:21

I\'m using CKEditor. I am saving the form values with ajax using page methods.

But the content of CKEditor value cannot be saving into the table.

I dont post

15条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-04 16:04

    I think it will be better, just serialize your form by jquery and cheers...

    and In javascript section

    CKEDITOR.replace('ck-editor', {
      extraPlugins: 'sourcedialog',
      removePlugins: 'sourcearea'
    });
    
    $("form#ajxForm").submit(function(e) {
      e.preventDefault();
      var data = $(this).serialize();
      if (data != '') {
        $.ajax({
          url: 'post.php',
          cache: false,
          type: 'POST',
          data: data,
          success: function(e) {
            setTimeout(function() {
              alert(e);
            }, 6500);
          }
        });
      }
      return;
    });
    

提交回复
热议问题