zl程序教程

您现在的位置是:首页 >  其他

当前栏目

CKEditor 案例

案例 ckeditor
2023-09-14 09:03:41 时间

官网下载:

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