-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
上传图片配置,配置了,但一直报没有配置上传地址 #3
Comments
运行这个 demo 可以成功吗? |
使用 const editorConfig: Partial<IEditorConfig> = {
// TS 语法
placeholder: '请输入内容...',
MENU_CONF: {
uploadImage: {
// base64LimitSize: 1 * 1024, // 5kb
uploadImgShowBase64: true,
},
},
}; 仍然报错需要配置服务器地址。base64的方式在react不支持了吗???vue是支持的 |
@hawx1993 都支持,不会单独抛弃 React 。 你运行这个 github 仓库的代码,会有报错吗? |
我也遇到了这个问题,不知道是不是跟你一样,我是在编辑器onCreated以后才对editorConfig.MENU_CONF['uploadImage'] 进行赋值,但是发现赋值没有成功,调用editor.getMenuConfig('uploadImage')查看配置,依然是赋值前的配置,尝试了很久终于知道了,editorConfig.MENU_CONF['uploadImage'] 要在编辑器创建前就要设置好,编辑器创建以后,再赋值就不起作用了。 |
同样报错“没有配置上传地址”,Vue2,,配置如下: {
//https://www.wangeditor.com/v5/editor-config.html#maxlength-onmaxlength
placeholder: "请输入...",
readOnly: false,
autoFocus: true,
scroll: true,
MENU_CONF: {
uploadImage: {
server: '/api/upload',
fieldName: "file",
headers: {}
},
uploadVideo: {
server: '/api/upload',
fieldName: "file",
headers: {}
}
}
} |
楼主正解,赞!!! |
上传图片配置,配置了,但一直报没有配置上传地址
The text was updated successfully, but these errors were encountered: