Ckeditor update textarea

后端 未结 10 1647
抹茶落季
抹茶落季 2020-12-01 03:10

I am trying to get the ckeditor working. Obviously it doesn\'t make use of the textarea so on submit the form doesn\'t submit the text in the editor. Beceause I make use of

10条回答
  •  半阙折子戏
    2020-12-01 03:35

    Thanks @JohnDel for the info, and i use onchange to make it update every change.

    CKEDITOR.on('instanceReady', function(){
       $.each( CKEDITOR.instances, function(instance) {
        CKEDITOR.instances[instance].on("change", function(e) {
            for ( instance in CKEDITOR.instances )
            CKEDITOR.instances[instance].updateElement();
        });
       });
    });
    

提交回复
热议问题