Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@looop/quill-image-upload
Advanced tools
A module for Quill rich text editor to upload images to be selected from toolbar editor.
A module for Quill rich text editor to upload images to be selected from toolbar editor.
import Quill from 'quill';
import { ImageUpload } from 'quill-image-upload';
Quill.register('modules/imageUpload', ImageUpload);
const quill = new Quill(editor, {
// ...
modules: {
// ...
imageUpload: {
url: '', // server url. If the url is empty then the base64 returns
method: 'POST', // change query method, default 'POST'
name: 'image', // custom form name
withCredentials: false, // withCredentials
headers: {}, // add custom headers, example { token: 'your-token'}
csrf: { token: 'token', hash: '' }, // add custom CSRF
customUploader: () => {}, // add custom uploader
// personalize successful callback and call next function to insert new url to the editor
callbackOK: (serverResponse, next) => {
next(serverResponse);
},
// personalize failed callback
callbackKO: serverError => {
alert(serverError);
},
// optional
// add callback when a image have been chosen
checkBeforeSend: (file, next) => {
console.log(file);
next(file); // go back to component and send to the server
}
}
}
});
Copy image-upload.min.js into your web root or include from node_modules
<script src="/node_modules/quill-image-upload/image-upload.min.js"></script>
var quill = new Quill(editor, {
// ...
modules: {
// ...
imageUpload: {
url: '', // server url. If the url is empty then the base64 returns
method: 'POST', // change query method, default 'POST'
name: 'image', // custom form name
withCredentials: false, // withCredentials
headers: {}, // add custom headers, example { token: 'your-token'}
// personalize successful callback and call next function to insert new url to the editor
callbackOK: (serverResponse, next) => {
next(serverResponse);
},
// personalize failed callback
callbackKO: serverError => {
alert(serverError);
}
}
}
});
FAQs
A module for Quill rich text editor to upload images to be selected from toolbar editor.
We found that @looop/quill-image-upload demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.