AJAX读出数据显示到UEeditor里面,报错。
function searchNewsInfo(newsID){
$.ajax({
//async : false,
cache : false,
type : "post",//发送方式
url : "/njceb/getNewsByNewId.action",// 路径
data : 'newsid='+newsID,
error : function() {//请求失败处理函数
alert('请求失败');
},
success : function(data) {
$.each(data, function(commentIndex, comment) {
if(commentIndex == 0)
{
var editor = new UE.ui.Editor();
editor.getEditor('editor').setContent(comment.content);
}
});
}
});
}
想把数据显示到editor里面,但是总是报错,或者没反应。
数据库里面存的是HTML文档,想拿出来放到编辑器里面修改,不知道拿出来的值会不会是HTML代码,
如果是代码,如何改成原来的样式,
希望大虾们多多指教。。。