1、在页面
中引入ckeditor核心文件ckeditor.js2、在使用编辑器的地方插入jsp页面控件
!!注意在控件中加上class="ckeditor"。(加上这个标识是为了将textArea渲染成ckeditor编辑框,或者使用
//初始换编辑器
CKEDITOR.replace('content', {
filebrowserImageUploadUrl :"${host}/topic/ckupload?",
codeSnippet_theme: 'zenburn',
height:'500'
});
在页面初始化该textArea文本框,但是两者不能同时使用,否则会报错,
[CKEDITOR] Error code: editor-element-conflict.报错
查看官方文档提示:
ckeditor获取文本内容:
ckeditor默认是通过标签的name属性作为依据,如果name属性不存在,才