ckeditor 使用几点

1.引用相关js

2.定义 id 为 editor1 的 area

 <textarea id="editor1" style="height: 380px;  900px"></textarea>

3.替换

 <script type="text/javascript">   
      var editor = CKEDITOR.replace("editor1",
       {
              language: 'vi', height: '370px',  '900px'
         });
 </script>

4. 赋值和取值

//取值对应实例名【editor1】的值,getData方法
var content=CKEDITOR.instances.editor1.getData();
//实例名【editor1】赋值为空
CKEDITOR.instances.editor1.setData('');
原文地址:https://www.cnblogs.com/dennysong/p/7305266.html