Security News
vlt Debuts New JavaScript Package Manager and Serverless Registry at NodeConf EU
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
quill-image-uploader
Advanced tools
A module for Quill rich text editor to allow images to be uploaded to a server instead of being base64 encoded
A module for Quill rich text editor to allow images to be uploaded to a server instead of being base64 encoded
Install with npm:
npm install quill-image-uploader --save
Include the CSS for the loading effect or create your own.
const quill = new Quill(editor, {
// ...
modules: {
// ...
imageUploader: {
upload: file => {
// return a Promise that resolves in a link to the uploaded image
return new Promise((resolve, reject) => {
const fd = new FormData();
fd.append("upload_file", file);
const xhr = new XMLHttpRequest();
xhr.open("POST", `${window.location.pathname}/api/files/add`, true);
xhr.onload = () => {
if (xhr.status === 200) {
const response = JSON.parse(xhr.responseText);
resolve(response.file_path); // Must resolve as a link to the image
}
};
xhr.send(fd);
});
}
}
}
});
FAQs
A module for Quill rich text editor to allow images to be uploaded to a server instead of being base64 encoded
We found that quill-image-uploader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
Security News
Research
The Socket Research Team uncovered a malicious Python package typosquatting the popular 'fabric' SSH library, silently exfiltrating AWS credentials from unsuspecting developers.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.