Ckeditor下载地址:http://ckeditor.com/download 1.CKeditor的基本配置 var textval=CKEDITOR.instances.TextArea1.getData(); //获取带HTML的值 var stemTxt=CKEDITOR.instances.TextArea1.document.getBody().getText();//获取纯文本 CKEDITOR.instances.TextArea1.setData(data.content)
参考博文:[实践]获取CKEditor的html文本.纯文本.被选中的内容及赋值 1.获取CKEditor被选中的内容 var mySelection = CKEDITOR.instances.WORK_INTRODUCTION.getSelection(); if (CKEDITOR.env.ie) { mySelection.unlock(true); data = mySelection.getNative().createRang