gpt4 book ai didi

javascript - Niceedit编辑器图片上传

转载 作者:行者123 更新时间:2023-11-28 09:11:50 25 4
gpt4 key购买 nike

我在我的网站中使用“niceEdit”编辑器,无论如何它都很有效,但现在当我尝试将图像“上传”到编辑器时我会收到此消息。

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

我查找了一下,发现有人修改了niceuplod文件,你还必须获取api key 。

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

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);

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

最佳答案

您必须在网站上拥有自己的 API 代码然后在你的niceUpload文件中更改它

你可以在代码的开头修改它

关于javascript - Niceedit编辑器图片上传,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16212573/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com