Gathering detailed insights and metrics for @xeger/quill-image-formats
Gathering detailed insights and metrics for @xeger/quill-image-formats
Gathering detailed insights and metrics for @xeger/quill-image-formats
Gathering detailed insights and metrics for @xeger/quill-image-formats
npm install @xeger/quill-image-formats
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
32 Stars
33 Commits
10 Forks
2 Watching
2 Branches
1 Contributors
Updated on 24 Sept 2024
TypeScript (78.68%)
HTML (15.25%)
JavaScript (6.07%)
Cumulative downloads
Total Downloads
Last day
-1.5%
386
Compared to previous day
Last week
5.1%
1,973
Compared to previous week
Last month
-0.5%
8,263
Compared to previous month
Last year
186.1%
83,127
Compared to previous year
This is a set of Quill modules, designed to be used together, that fully integrate with the Quill Delta format to provide resizable, floatable images that cleanly "round trip" between HTML and JSON.
Visit our code sandbox to try it out yourself.
This project is a fork and rewrite of quill-blot-formatter, which is itself a fork of an earlier work. This project makes the following improvements:
@xeger/quill-image-formats
which extends Quill's built-in Image
blot with new formats; and @xeger/quill-image-actions
which contains the UI for applying and removing those formats.align
(an existing block format) to images, we define a new float
format which allows text to wrap naturally around images.quill
or parchment
packages, making them more portable and compatible with a wider range of transpilation environments, including "no transpilation" i.e. direct embedding in an HTML page alongside the Quill distribution bundle.Note: these packages are pure Node modules and do not have default exports. They are distributed with both a CommonJS bundle and an ES module. The primary export from each package is a Quill module, but additional, nested exports provide access to the implementation details to facilitate customization. Typings are provided for all exports.
See the demo page or the code sandbox for a complete, working example.
Whenever you new Quill
, make sure to include the formats and the modules in its configuration; otherwise things will not work right.
Important: It seems that there is a conflict between Quill and Tailwind CSS, which applies display: block
to img tag which, prevents the float
styles in quill-image-formats
from affecting the image positioning.
If your project uses both Tailwind and Quill, you need to add extra CSS rules so that img
inside the Quill editor are positioned as inline
or inline-block
; otherwise, the image alignment features of quill-image-actions
will not work.
Add the quill-image
packages to your project's dependencies.
1npm install @xeger/quill-image-actions --save-prod 2npm install @xeger/quill-image-formats --save-prod
At startup, import the extension modules and register them with react-quill
's wrapper of the Quill framework.
1import { Quill } from 'react-quill'; 2import { ImageActions } from '@xeger/quill-image-actions'; 3import { ImageFormats } from '@xeger/quill-image-formats'; 4 5Quill.register('modules/imageActions', ImageActions); 6Quill.register('modules/imageFormats', ImageFormats);
Whenever you new ReactQuill
, make sure to include the formats and the modules in its configuration; otherwise things will not work right.
1import React from 'react'; 2import ReactQuill from 'react-quill'; 3 4const formats = ['align', 'float']; 5const modules = { 6 imageActions: {}, 7 imageFormats: {}, 8 toolbar: [ 9 [{ 'align': [] }], 10 ['clean'] 11 ] 12}; 13 14export const Editor(): React.FC = () => ( 15 <ReactQuill 16 formats={formats} 17 modules={modules} 18 theme="snow" 19 /> 20);
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
dependency not pinned by hash detected -- score normalized to 4
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
13 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
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 More