-
Notifications
You must be signed in to change notification settings - Fork 79
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
更改图片工具条行为 #30
Comments
@devotion987 //toolbar 是小写的
let btn = mditor.toolbar.getItem('image'); |
@Houfeng 小写也不行 |
@devotion987 //获取或设置编辑器的值
mditor.on('ready', function(){
//toolbar 是小写的
let btn = mditor.toolbar.getItem('image');
console.log(btn);
}); |
我是这么写的,按照你的方式没错了,感谢!
}); |
@Houfeng 你好大神,想请教下点击“图片”工具条从本地选择图片然后上传到服务器,在上述代码 |
@devotion987 |
@Houfeng 最近在使用tale搭建博客,编辑器使用的是mditor,觉得图片上传功能使用不太方便,想到两种实现方式,第一种是上面说的,第二种是当使用截图工具截取图片时,ctrl+v直接复制将图片上传到本地或者七牛服务器,然后返回图片链接地址。由于本人主要做后端开发,对前端了解不太多,还请指点一二,功能完成也可以分享出来,不胜感激,另外,有QQ或Q群可以加下,方便交流! |
按照说明,更改图片工具条行为API:let btn = mditor.Toolbar.getItem('image');但页面报错:Uncaught TypeError: Cannot read property 'getItem' of undefined,求指教!
The text was updated successfully, but these errors were encountered: