1

我在我的网站上使用“niceEdit”编辑器,无论如何它很有魅力,但现在当我尝试将图像“上传”到编辑器时,我得到了这个按摩。

“上传您的图片时出错(将您的图片发送到 imageshack 失败。”

我找了一下,发现有人用 niceuplod 文件更改了,你还必须获取 api 密钥。

所以我改变了从以下调用编辑器的方式:

bkLib.onDomLoaded(function() { 
           nicEditors.allTextAreas(new nicEditor({maxHeight : 250}).panelInstance('contect'));

         });

        $('form').submit(function(){
nicEditors.findEditor('contect').saveContent();
//console.log(nicEditors.findEditor('contect').getContent());

        });



to this one 
bkLib.onDomLoaded(function() {
    new nicEditor({
        buttonList : ['bold','italic','underline','upload'],
        iconsPath:'nicEditorIcons.gif',
        uploadURI : 'nicUpload.php', 
    }).panelInstance('contect');
});

then i got the following error 
top.nicUploadButton is undefined
and in my console the following 
TypeError: r.removeInstance is not a function

r.removeInstance(e);

那么为什么你认为我有这个问题,我应该从哪里开始寻找?

4

2 回答 2

0

您必须从网站获得自己的 API 代码,然后在 niceUpload 文件中进行更改

你会在代码的开头罚款它

于 2013-04-25T10:48:25.510 回答
0

http://wiki.nicedit.com/w/page/515/Configuration%20Options

寻找 uploadURI 选项,它对你有用,对我也有用。

于 2015-12-22T10:40:42.570 回答