ckeditor content into textarea on change event - multiple ckeditors on form

前端 未结 3 1207
面向向阳花
面向向阳花 2020-12-30 12:25

With a lot of help I finally got the CKEditor to update the associated text area. See the post here.

However, I am stumped of how to get the CKEditor to update each

3条回答
  •  盖世英雄少女心
    2020-12-30 13:11

    The code you have written will update the textarea of only one CKEditor at a time since it is adding a change event to each CKEditor. So this will always update the last element that has been changed.

    The way I handle updation of multiple CKEditors is by using this code when submitting my form

    for (var i in CKEDITOR.instances) {
       CKEDITOR.instances[i].updateElement();
    }
    

提交回复
热议问题