是否有一种方便快捷的方式将onchange事件添加到CKeditor中。向ckeditor添加onchange事件的简单方法?
我想在文字变化时做点什么?由于
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<script src="js/ckeditor/ckeditor.js" type="text/javascript"></script>
<script src="js/ckeditor/adapters/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
$(function() {
var config = {
toolbar:
[
['Bold', 'Italic', '-', 'NumberedList', 'BulletedList']
],
width: 600,
height: 400,
resize: false
};
$('.jquery_ckeditor').ckeditor(config);
CKEDITOR.instances[0].on('change', function() {
alert("test");
});
});
//]]>
</script>
</head>
<body>
<textarea class="jquery_ckeditor" cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
</body>
</html>
它已经拥有了整个API进军,包括[事件](http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.event.html) – j08691 2012-08-16 19:24:24
喜更换它是的,我知道,但我不明白 – 2012-08-16 19:27:43
可能重复[检测onChange从CKEditor使用JQuery的事件](http://stackoverflow.com/questions/5143516/detecting-onchange-events-from-a-ckeditor-using-jquery) – AlfonsoML 2012-08-16 22:06:01