在同一个页面中多个kindeditor,只有两个起作用,怎么解决?

一个页面多个 kindeditor ,只有两个起作用如何解决?

在同一个页面中,多个 kindeditor 无法获取 textarea 值,怎么解决?


解决方案:

只要回调一下就可以。如下示例所示:

使用 afterBlur 回调

var editor1,editor2,editor3,editor4;
    KindEditor.ready(function(K) {
        editor1  =  K.create('#editor_id1');
        editor2  =  K.create('#editor_id2');
        // 第三个开始 不起作用
        editor3  =  K.create('#editor_id3',{
            afterBlur:function(){this.sync();}
        });
        editor4  =  K.create('#editor_id4',{
            afterBlur:function(){this.sync();}
        });
    });


文章来源地址https://www.toymoban.com/article/75.html

到此这篇关于在同一个页面中多个kindeditor,只有两个起作用,怎么解决?的文章就介绍到这了,更多相关内容可以在右上角搜索或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

原文地址:https://www.toymoban.com/article/75.html

如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请联系站长进行投诉反馈,一经查实,立即删除!

领支付宝红包赞助服务器费用
未经允许不得转载:Toy模板网 » 在同一个页面中多个kindeditor,只有两个起作用,怎么解决?

相关文章

    系统发生错误

    系统发生错误

    您可以选择 [ 重试 ] [ 返回 ] 或者 [ 回到首页 ]

    [ 错误信息 ]

    页面错误!请稍后再试~

    Tob