Installations
npm install quill-image-resize
Releases
Unable to fetch releases
Developer
Etoile984816138
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
No
Node Version
8.9.3
NPM Version
5.6.0
Statistics
24 Stars
47 Commits
36 Forks
5 Watching
2 Branches
1 Contributors
Updated on 19 Oct 2024
Bundle Size
260.10 kB
Minified
58.40 kB
Minified + Gzipped
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
2,892,402
Last day
-14.5%
3,991
Compared to previous day
Last week
-1.8%
22,727
Compared to previous week
Last month
10.7%
95,247
Compared to previous month
Last year
-2.1%
919,419
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Quill ImageResize Module
A module for Quill rich text editor to allow images to be resized.
Also see quill-image-drop-module, a module that enables copy-paste and drag/drop for Quill.
Demo
Usage
Webpack/ES6
1import Quill from 'quill'; 2import { ImageResize } from 'quill-image-resize-module'; 3 4Quill.register('modules/imageResize', ImageResize); 5 6const quill = new Quill(editor, { 7 // ... 8 modules: { 9 // ... 10 imageResize: { 11 // See optional "config" below 12 } 13 } 14});
Script Tag
Copy image-resize.min.js into your web root or include from node_modules
1<script src="/node_modules/quill-image-resize-module/image-resize.min.js"></script>
1var quill = new Quill(editor, { 2 // ... 3 modules: { 4 // ... 5 ImageResize: { 6 // See optional "config" below 7 } 8 } 9});
Config
For the default experience, pass an empty object, like so:
1var quill = new Quill(editor, { 2 // ... 3 modules: { 4 // ... 5 ImageResize: {} 6 } 7});
Functionality is broken down into modules, which can be mixed and matched as you like. For example, the default is to include all modules:
1const quill = new Quill(editor, { 2 // ... 3 modules: { 4 // ... 5 ImageResize: { 6 modules: [ 'Resize', 'DisplaySize', 'Toolbar' ] 7 } 8 } 9});
Each module is described below.
Resize
- Resize the image
Adds handles to the image's corners which can be dragged with the mouse to resize the image.
The look and feel can be controlled with options:
1var quill = new Quill(editor, { 2 // ... 3 modules: { 4 // ... 5 ImageResize: { 6 // ... 7 handleStyles: { 8 backgroundColor: 'black', 9 border: 'none', 10 color: white 11 // other camelCase styles for size display 12 } 13 } 14 } 15});
DisplaySize
- Display pixel size
Shows the size of the image in pixels near the bottom right of the image.
The look and feel can be controlled with options:
1var quill = new Quill(editor, { 2 // ... 3 modules: { 4 // ... 5 ImageResize: { 6 // ... 7 displayStyles: { 8 backgroundColor: 'black', 9 border: 'none', 10 color: white 11 // other camelCase styles for size display 12 } 13 } 14 } 15});
Toolbar
- Image alignment tools
Displays a toolbar below the image, where the user can select an alignment for the image.
The look and feel can be controlled with options:
1var quill = new Quill(editor, { 2 // ... 3 modules: { 4 // ... 5 ImageResize: { 6 // ... 7 toolbarStyles: { 8 backgroundColor: 'black', 9 border: 'none', 10 color: white 11 // other camelCase styles for size display 12 }, 13 toolbarButtonStyles: { 14 // ... 15 }, 16 toolbarButtonSvgStyles: { 17 // ... 18 }, 19 } 20 } 21});
BaseModule
- Include your own custom module
You can write your own module by extending the BaseModule
class, and then including it in
the module setup.
For example,
1import { Resize, BaseModule } from 'quill-image-resize-module'; 2 3class MyModule extends BaseModule { 4 // See src/modules/BaseModule.js for documentation on the various lifecycle callbacks 5} 6 7var quill = new Quill(editor, { 8 // ... 9 modules: { 10 // ... 11 ImageResize: { 12 modules: [ MyModule, Resize ], 13 // ... 14 } 15 } 16});
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
56 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-6chw-6frg-f759
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx
- Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw
- Warn: Project is vulnerable to: GHSA-c6rq-rjc2-86v2
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-vh7m-p724-62c2
- Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w
- Warn: Project is vulnerable to: GHSA-434g-2637-qmqr
- Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m
- Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw
- Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p
- Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747
- Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h
- Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3
- Warn: Project is vulnerable to: MAL-2023-462
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37
- Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546
- Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-282f-qqgm-c34q
- Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp
- Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq
- Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574
- Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m / GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-fhjf-83wg-r2j9
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-588m-9qg5-35pq
- Warn: Project is vulnerable to: GHSA-4943-9vgg-gr5r
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp
- Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr
- Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6
- Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj
- Warn: Project is vulnerable to: GHSA-j44m-qm6p-hp7m
- Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9
- Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw
- Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc
- Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh
- Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
- Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp
Score
1.7
/10
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to quill-image-resize
quill-image-resize-vue
'quill-image-resize-module's Fixed Version in Vue'
quill-image-resize-and-rotate-module
Forked from https://github.com/kensnyder/quill-image-resize-module. Added rotate functionality.
quill-image-resize-module
A module for Quill rich text editor to allow images to be resized.
quill-image-resize-module-react
A module for Quill rich text editor to allow images to be resized (with react fixes).