Gathering detailed insights and metrics for quill-autoformat
Gathering detailed insights and metrics for quill-autoformat
Gathering detailed insights and metrics for quill-autoformat
Gathering detailed insights and metrics for quill-autoformat
Module for formatting and transforming text as you type in Quill
npm install quill-autoformat
Typescript
Module System
Min. Node Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
71 Stars
10 Commits
10 Forks
6 Watchers
1 Branches
3 Contributors
Updated on Feb 09, 2025
Latest Version
0.1.2
Package Id
quill-autoformat@0.1.2
Unpacked Size
26.46 kB
Size
8.88 kB
File Count
17
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
5
Module for transforming and formatting text as you type or paste in Quill. Using RegExp to find and trigger transformations for text such as links, mentions, hashtags or emojis. Out of the box support for:
Note: Requires Quill 2.0
To add quill-autoformat to your Quill, simply add the javascript after quill or import it in your project. Use the provided quill-formats or define your own parchments.
1<body> 2 ... 3 <form action="#" method="get"> 4 <div id="editor-container"></div> 5 </form> 6 ... 7 <script src="/path/to/quill.min.js"></script> 8 <script src="/path/to/quill-autoformat.js"></script> 9 <script> 10 var editor = new Quill('#editor-container', { 11 modules: { 12 autoformat: true 13 } 14 }); 15 </script> 16 ... 17</body>
You can specify as many transforms as you like, just give each transform a unique name. Three transforms are enabled by default; hashtag, mention and link. Just set the default types to false to disable them or change any property you like to a custom value.
Each transform may have the following properties:
1transform: { 2 trigger: RegExp, // RegExp for matching text input characters to trigger the match. Defaults to /./ which is matching any character 3 find: RegExp, // Global RegExp to search for in the text 4 extract: RegExp, // Additional RegExp to finetune and override the found text match 5 transform: String || Function, // String or function passed to String.replace() to rewrite find/extract results 6 insert: String || {...}, // Insert name string or embed insert object. 7 format: String || {...} // Format name string or attributes object. 8 }
Specify one option or more to override defaults.
1var editor = new Quill('#editor-container', { 2 modules: { 3 autoformat: { 4 hashtag: { 5 trigger: /[\s.,;:!?]/, 6 find: /(?:^|\s)#[^\s.,;:!?]+/i, 7 extract: /#([^\s.,;:!?]+)/i, 8 transform: '$1', 9 insert: 'hashtag' 10 }, 11 mention: { 12 trigger: /[\s.,;:!?]/, 13 find: /(?:^|\s)@[^\s.,;:!?]+/i, 14 extract: /@([^\s.,;:!?]+)/i, 15 transform: '$1', 16 insert: 'mention' 17 }, 18 link: { 19 trigger: /[\s]/, 20 find: /https?:\/\/[\S]+|(www\.[\S]+)/gi, 21 transform: function (value, noProtocol) { // value == match[0], noProtocol == match[1] 22 return noProtocol ? "http://" + value : value; 23 }, 24 format: 'link' 25 } 26 } 27 } 28});
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/10 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
55 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
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