You can configure allowed MIME image types and prevent users from inserting images into the DevExtreme HTML Editor component (disable drop and paste operations).
onInitialized(e) {
const Uploader = e.component.get('modules/uploader');
class DisabledUploader extends Uploader {
constructor(quill, options) {
// Define empty array to prevent any image type from being pasted or dropped
super(quill, { ...options, mimetypes: [] });
}
}
e.component.register({ 'modules/uploader': DisabledUploader });
},
Note: In this instance, you cannot use drag-and-drop, the paste command, and the base64
image uploader to upload local files. You can only add images using server
upload mode.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4