ckeditor中的简单图像浏览器

时间:2015-06-05 11:25:57

标签: javascript jquery ajax asp.net-mvc asp.net-mvc-4

我正在使用ckeditor(MDN)的简单图像浏览器插件和asp.net mvc4。

我尝试在文档中使用它,但它仍无效。

我的脚本是:

public JsonResult SomeActionMethod(){
var items = new[] {
                  new {url = "http://localhost:63220/Images/heroAccent.png"}, 
                  new {url = "http://localhost:63220/Images/heroAccent.png"}};
    return Json(items, JsonRequestBehavior.AllowGet);
}

我的控制器是:

Uncaught TypeError: Cannot read property 'length' of null

在控制台中会抛出错误:

$(this)

有人有使用它的经验吗?

1 个答案:

答案 0 :(得分:0)

@Prakash Rai - ITH: 打开config.js文件,您将看到代码:

return console.log(a),b=$.parseJSON(a)

如果您已经返回JSON,则应替换

return console.log(a),b=a