先把ckeditor文件添加到项目中
然后在页面上引用
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>ckediot编辑器的简单使用</title> <script type="text/javascript" src="js/ckeidtor/ckeditor.js"></script> </head> <body> <form action="PostMsg.ashx" method="post"> <table> <tbody> <tr><td>昵称:<input type="text" name="NickName"/></td></tr> <tr><td>标题:<input type="text" name="Title"/></td></tr> <tr><td>正文:</td><td><textarea name="Msg" id="ZhengWen" cols="50" rows="6"></textarea></td></tr> <tr><td></td><td><input type="submit" name="Save" value="发表"/></td></tr> </tbody> </table> <script type="text/javascript"> var content = document.getElementById("ZhengWen");
//把content的内容替换为ceeditor的编辑器的内容 CKEDITOR.replace(content); </script> </form> </body> </html>