jQuery Cleditor get textarea value on keyup

前端 未结 3 1997
被撕碎了的回忆
被撕碎了的回忆 2021-02-08 10:19

I\'m using Cleditor http://premiumsoftware.net/cleditor/docs/GettingStarted.html. I want to get the value on keyup and insert the text into another div. cleditor comes with chan

3条回答
  •  独厮守ぢ
    2021-02-08 10:58

    Have you tried using of CLEditor '.doc' property?

    doc - The document object currently being edited in the iframe. cleditor documentation

    var inputDoc = $("#input").cleditor().doc;
    
    $(inputDoc).keyup(function(){
        var v = $('#input').val();
       $('#x').html(v);
    })
    

提交回复
热议问题