kindeditor4.1取纯文本值

幻影Z 发布于 2012/05/24 09:08
阅读 3K+
收藏 0

NGINX Sprint China 2022--NGINX年度旗舰盛会,已开启免费预约!>>>

 

var editor1;
  KindEditor.ready(function(K) {
   editor1 = K.create('textarea[name="FCKeditor1"]', {
    cssPath : '../../kindeditor/plugins/code/prettify.css',
    uploadJson : '../../kindeditor/jsp/upload_json.jsp',
//    fileManagerJson : '../../kindeditor/jsp/file_manager_json.jsp',
    resizeMode: 0,
    items : [
  'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
  'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
  'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
  'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
  'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
  'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 
  'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
  'anchor', 'link', 'unlink', '|', 'about'],
    allowFileManager : true   
   }); 
  });
 function save(){
  editor1.sync(); 
  var a=editor1.util.getpureData("FCKeditor1"); 
  alert(a);    
  document.forms['xForm'].submit();
 }

代码是这样的,为什么报js错误:editor1.util 为空或不是对象

加载中
0
iSea
iSea

editor1.text()

看看文档,貌似没有这个方法.util.getpureData("FCKeditor1");

OSCHINA
登录后可查看更多优质内容
返回顶部
顶部