https://github.com/lukevp/quill-fire
Extend Quill JS editor to fire events as soon as matching text is entered!
https://github.com/lukevp/quill-fire
Last synced: 9 months ago
JSON representation
Extend Quill JS editor to fire events as soon as matching text is entered!
- Host: GitHub
- URL: https://github.com/lukevp/quill-fire
- Owner: lukevp
- License: mit
- Created: 2020-05-04T03:01:56.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-27T23:16:26.000Z (over 2 years ago)
- Last Synced: 2025-04-24T05:42:49.272Z (9 months ago)
- Language: TypeScript
- Size: 935 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# quill-fire
Extend Quill JS editor to fire events as soon as matching text is entered!
Available on NPM at: https://www.npmjs.com/package/quill-fire
# Example usage:
```javascript
const fire: FireOptions = {
items: [
{
action: () => {
console.log("Found!");
return null;
},
matchString: "/",
prefix: /([\s.?!)]+$)|(^$)/,
ignoreCase: true,
},
{
action: () => {
console.log("Found case insensitive string: MATCH");
return null;
},
matchString: "MATCH",
ignoreCase: true,
prefix: /\s+$/,
removeMatchingText: true,
},
{
action: () => {
console.log("Found case sensitive string: caSeTest");
return null;
},
matchString: "caSeTest",
removeMatchingText: false,
ignoreCase: false,
},
{
action: () => {
console.log("Found exact string Bar after string FOO");
return null;
},
prefix: /FOO$/,
matchString: "Bar",
removeMatchingText: false,
ignoreCase: false,
},
],
};
```