Socket
Socket
Sign inDemoInstall

quill

Package Overview
Dependencies
7
Maintainers
2
Versions
92
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    quill

Your powerful, rich text editor


Version published
Weekly downloads
1.3M
decreased by-1.38%
Maintainers
2
Install size
4.10 MB
Created
Weekly downloads
 

Package description

What is quill?

Quill is a modern WYSIWYG editor built for compatibility and extensibility. It allows for rich text editing with a customizable toolbar and API. It's designed to be easy to use and integrate into web applications.

What are quill's main functionalities?

Basic Text Formatting

This code initializes a Quill editor with basic text formatting options such as bold, italic, underline, and strike-through, as well as blockquote and code block formatting.

var quill = new Quill('#editor', {
  modules: {
    toolbar: [
      ['bold', 'italic', 'underline', 'strike'],
      ['blockquote', 'code-block']
    ]
  },
  placeholder: 'Compose an epic...',
  theme: 'snow'
});

Adding Custom Toolbar Buttons

This code demonstrates how to add a custom button to the Quill toolbar and define a custom event handler for it.

var quill = new Quill('#editor', {
  modules: {
    toolbar: {
      container: '#toolbar',
      handlers: {
        'customButton': function() {
          console.log('Custom button clicked!');
        }
      }
    }
  },
  theme: 'snow'
});

// Assuming there is a button with class 'ql-customButton' in the toolbar

Handling Content Changes

This code sets up an event listener to log changes to the content of the Quill editor, providing the delta of the change.

var quill = new Quill('#editor', {
  theme: 'snow'
});

quill.on('text-change', function(delta, oldDelta, source) {
  console.log('Text was changed!', delta);
});

Setting and Getting Content

This code shows how to set the content of a Quill editor using a delta and how to retrieve the content as a delta.

var quill = new Quill('#editor', {
  theme: 'snow'
});

// Set content
var delta = quill.clipboard.convert('<h1>Quill Rocks</h1>');
quill.setContents(delta);

// Get content
var content = quill.getContents();
console.log(content);

Other packages similar to quill

Changelog

Source

2.0.0

We are thrilled to announce the release of Quill 2.0! Please check out the announcement post.

Major Improvements

  • Quill is now a valid ESM package for better ecosystem (e.g. bundlers) and tree-shaking support
  • Nested Quill support #3590
  • Improved IME and spell corrector support #3807
  • Semantic cleanups for TEXT_CHANGE event #3778
  • History: Record selection in history module #3823
  • Auto detect scrolling container #3840
  • Clipboard: Improve support for pasting from Google Docs and Microsoft Word

Performance Improvements

Quill 2.0 includes many performance optimizations, the most important of which is the improved rendering speed for large content.

  • Improve inserting performance #3815
  • Avoid fetching selections when possible #3538
  • No need to setContents when container is empty #3539

Code Modernization

  • Migrated to TypeScript
  • Provided official TypeScript declarations
  • Migrated to Vitest for unit testing
  • Migrated to Playwright for E2E testing
  • Migrated website to Gatsby

For all commits, please see the 2.0.0 release page.

Readme

Source

Note: This branch and README covers the upcoming 2.0 release. View 1.x docs here.

Quill Rich Text Editor

Quill Logo

DocumentationDevelopmentContributingInteractive Playground

Build Status Version Downloads

Quill is a modern rich text editor built for compatibility and extensibility. It was created by Jason Chen and Byron Milligan and actively maintained by Slab.

To get started, check out https://quilljs.com/ for documentation, guides, and live demos!

Community

Get help or stay up to date.

Keywords

FAQs

Last updated on 17 Apr 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc