CKEditor 案例

官网下载:

http://ckeditor.com/download

将下载的ckeditor整个文件放入项目中

在页面中引用ckeditor.js,并用新建一个<textarea>再建一个<script>完了用CKEDITOR.replace("textarea 的name")替换掉原textarea即可

ckeditor的大小以及其他的属性需要在config.js中配置

 getData()获取ckeditor的所有内容,eg:标签 样式 等

getText()单纯的获取ckeditor的文本

 

 CKEditor 的参数配置

http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html

原文地址:https://www.cnblogs.com/austinspark-jessylu/p/6016770.html