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