标签:ckeditor
键盘事件绑定:
<html> <head> <base href="<%=basePath%>"> <title>Insert title here</title> <script type="text/javascript" src=\‘#\‘" /ckeditor/ckeditor.js"></script> </head> <body> <form action="" method="post"> <textarea class="ckeditor" name="context" id="context"></textarea> <input type="button" value="提交" onclick="test()"/> </form> <div id="info"></div> ${param.context } <script type="text/javascript"> //键盘事件绑定 var editor = CKEDITOR.replace(‘context‘); CKEDITOR.instances["context"].on("key", function(evt){ document.getElementById("info").innerHTML =editor.getData(); }); </script> </body> </html>
本文出自 “老牛Java” 博客,请务必保留此出处http://liuyj.blog.51cto.com/2340749/1575788
标签:ckeditor
原文地址:http://liuyj.blog.51cto.com/2340749/1575788