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

前端 未结 3 1183
面向向阳花
面向向阳花 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:08

    In case you replace textarea elements by class name, just do this:

    CKEDITOR.on('instanceReady', function(event) {
        var editor = event.editor;
    
        editor.on('change', function(event) {
            // Sync textarea
            this.updateElement();
        });
    });
    

提交回复
热议问题