如何设置上传图像的数量限制?
我使用ckeditor 5库作为我的textarea,
我有此JS代码
jQuery(function ($) {
ClassicEditor.create(document.querySelector('#history-description'), {
"toolbar": ["imageUpload", "bold", "link", "bulletedList", "uploadImage", "blockQuote"],
"ckfinder": {
"uploadUrl": "uploadImage.php",
"options": {
resourceType: ['jpeg', 'png', 'jpg']
}
},
}).then(editor => {
// editor.plugins.get('FileRepository').on('change:uploadTotal', evt => {
// console.log('Image uploaded evt');
// console.log(evt);
// });
}).catch(error => {
console.error(error);
});
});
如何设置上传图像的数量?
例如:上传文件的最大数量只能是10
I used ckeditor 5 library for my textarea
I have this JS code
jQuery(function ($) {
ClassicEditor.create(document.querySelector('#history-description'), {
"toolbar": ["imageUpload", "bold", "link", "bulletedList", "uploadImage", "blockQuote"],
"ckfinder": {
"uploadUrl": "uploadImage.php",
"options": {
resourceType: ['jpeg', 'png', 'jpg']
}
},
}).then(editor => {
// editor.plugins.get('FileRepository').on('change:uploadTotal', evt => {
// console.log('Image uploaded evt');
// console.log(evt);
// });
}).catch(error => {
console.error(error);
});
});
How to set a limit on the number of uploaded images?
For example: the maximum number of uploaded files can only be 10
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论