@botom/quill-resize-module
v2.1.0
Published
π Secure & modern Quill.js module for resizing images, videos, and iframes with zero vulnerabilities and automatic releases
Maintainers
Readme
Quill Resize Module
A modern, secure module for the Quill rich text editor that allows you to resize images, videos, and iframes with comprehensive security updates and enhanced features.
β¨ Features
- πΌοΈ Image Resizing - Resize images with drag handles
- π₯ Video Resizing - Resize videos maintaining aspect ratio
- π± Responsive Design - Works on all devices
- π Multi-language Support - Customizable locale options
- π Security First - Zero vulnerabilities, modern dependencies
- β‘ Performance Optimized - Lightweight and fast
- π¨ Customizable Toolbar - Show/hide alignment and size tools
- π Size Display - Optional size indicator
π Demo
Live Demo: https://botoom.github.io/quill-resize-module/

π¦ Installation
npm install @botom/quill-resize-moduleπ οΈ Usage
ES6/TypeScript
import Quill from "quill";
import ResizeModule from "@botom/quill-resize-module";
Quill.register("modules/resize", ResizeModule);
const quill = new Quill("#editor", {
modules: {
resize: {
showSize: true,
locale: {
altTip: "Hold down the alt key to zoom",
floatLeft: "Left",
floatRight: "Right",
center: "Center",
restore: "Restore",
},
},
},
});Browser (CDN)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Quill Resize Module Demo</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/quill.snow.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/quill.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@botom/quill-resize-module@latest/dist/quill-resize-module.js"></script>
</head>
<body>
<div id="editor"></div>
<script>
Quill.register("modules/resize", window.QuillResizeModule);
const quill = new Quill("#editor", {
modules: {
toolbar: ["bold", "italic", "image", "video"],
resize: {
showSize: true,
locale: {}
}
},
theme: "snow"
});
</script>
</body>
</html>βοΈ Configuration Options
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| showToolbar | boolean | true | Show/hide the toolbar |
| showSize | boolean | false | Display current dimensions |
| locale | object | {} | Custom language strings |
| toolbar.sizeTools | boolean | true | Show size adjustment tools |
| toolbar.alingTools | boolean | true | Show alignment tools |
Locale Configuration
const quill = new Quill("#editor", {
modules: {
resize: {
locale: {
altTip: "Hold down the alt key to zoom",
floatLeft: "Left",
floatRight: "Right",
center: "Center",
restore: "Restore",
},
},
},
});Toolbar Customization
// Hide alignment tools (for newer Quill versions)
const quill = new Quill("#editor", {
modules: {
resize: {
toolbar: {
alingTools: false, // Hide alignment
sizeTools: true, // Keep size tools
},
},
},
});π§ Advanced Configuration
For the latest versions of Quill that don't support the style attribute:
const quill = new Quill("#editor", {
modules: {
resize: {
toolbar: {
alingTools: false, // Disable alignment tools
},
showSize: true,
},
},
});π Bug Fixes & Security
Recent Fixes
- β Fixed positioning when nested inside relative elements (PR #12)
- β Security vulnerabilities resolved (DOM Clobbering XSS, RCE)
- β Dependencies updated to latest secure versions
- β Build system modernized with Rollup v3
Security Status
- π 0 vulnerabilities (npm audit)
- π‘οΈ Modern dependencies (no deprecated packages)
- β CI/CD security with Node.js 20.x
π± Browser Support
| Browser | Version | |---------|---------| | Chrome | 70+ | | Firefox | 65+ | | Safari | 12+ | | Edge | 79+ |
π€ Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Commit Convention
This project follows Conventional Commits for automated versioning:
feat:for new featuresfix:for bug fixesdocs:for documentationstyle:for formattingrefactor:for code refactoringtest:for testschore:for maintenance
π Development
# Clone the repository
git clone https://github.com/BOTOOM/quill-resize-module.git
cd quill-resize-module
# Install dependencies
npm install
# Start development
npm run dev
# Run tests
npm test
# Build for production
npm run buildπ License
MIT Β© Edwar Diaz
π Related Projects
- Quill.js - Modern rich text editor
- Quill Image Resize - Alternative image resize module
π Stats
