首先,這個問題是在這裏回答:CKeditor character/word count但所有的答案給斷開的鏈接......因此它沒有回答。CKEditor字符數
使用CKEditor,如何使用jquery獲取keyup上的字符數?
這裏是應該工作,但確實不工作:
<textarea id="newKnowledge_body"></textarea>
<script>
$(function(){
// this DOES work, fyi
$("#newKnowledge_body").ckeditor();
// this DOES NOT work
$("#newKnowledge_body").keyup(function(){
var len = $("#newKnowledge_body").val().length;
alert(len);
});
});
</script>
我認爲,問題就出在 「KEYUP」 事件。我沒有得到任何迴應時,像這樣......但我不知道還有什麼其他用途。