Security News
UK Officials Consider Banning Ransomware Payments from Public Entities
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
quill-cursors
Advanced tools
A multi cursor module for Quill text editor.
Install quill-cursors
module through npm:
$ npm install quill-cursors --save
To include quill-cursors
in your Quill project, simply add the stylesheet and all the Javascripts to your page. The module already takes care of its registering so you just need to add 'cursors' to your module config when you instantiate your editor(s).
<head>
...
<link rel="stylesheet" href="/path/to/quill-cursors.css">
...
</head>
<body>
...
<script src="/path/to/quill.min.js"></script>
<script src="/path/to/quill-cursors.min.js"></script>
<script>
var editor = new Quill('#editor-container', {
modules: {
'cursors': true,
}
});
editor.registerTextChangeListener();
</script>
</body>
To set a cursor call:
editor.getModule('cursors').set({
id: '1',
name: 'User 1',
color: 'red',
range: range
});
Please note, that this module only handles the cursors drawing on a Quill instance. You must produce some additional code to handle actual cursor sync in a real scenario. So, it's assumed that:
'text-change'
event - so if the client/instance contents are updated locally or through a updateContents()
call, one shouldn't be needing to do anything to update/shift the displayed cursors;selection-change
events;For a simple local-based implementation, check the included example.
Run npm run build
to package a build and npm run start
to build, start the example webserver and watch for changes.
A few things that can be improved:
FAQs
A multi cursor module for Quill.
The npm package quill-cursors receives a total of 5,426 weekly downloads. As such, quill-cursors popularity was classified as popular.
We found that quill-cursors demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.