Socket
Socket
Sign inDemoInstall

ng2-quill

Package Overview
Dependencies
43
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ng2-quill

Angular2 component for rich text editor Quill


Version published
Weekly downloads
5
increased by400%
Maintainers
1
Install size
17.8 MB
Created
Weekly downloads
 

Readme

Source

ng2-quill

Angular2 component for rich text editor Quill

ng2-quill is the angular 2 implementation of ngQuill. This project was generated with angular-cli version 1.0.0-beta.19-3.

Examples

demo-page

Installation

  • install QuillJS 1.1.5 npm install ng2-quill
  • include bubble.css, snow.css in your index.html
  • add QuillModule to your own NgModule: node_modules/ng2-quill/src/quill/quill.module.ts
  • use <quill-editor></quill-editor> in your templates to add a default quill editor

Config

  • ngModel - set initial value or allow two-way databinding
  • readOnly (true | false) if user can edit content
  • formats - array of allowed formats/groupings
  • modules - configure/disable quill modules, e.g toolbar or add custom toolbar via html element default is
{
  toolbar: [
    ['bold', 'italic', 'underline', 'strike'],        // toggled buttons
    ['blockquote', 'code-block'],

    [{ 'header': 1 }, { 'header': 2 }],               // custom button values
    [{ 'list': 'ordered'}, { 'list': 'bullet' }],
    [{ 'script': 'sub'}, { 'script': 'super' }],      // superscript/subscript
    [{ 'indent': '-1'}, { 'indent': '+1' }],          // outdent/indent
    [{ 'direction': 'rtl' }],                         // text direction

    [{ 'size': ['small', false, 'large', 'huge'] }],  // custom dropdown
    [{ 'header': [1, 2, 3, 4, 5, 6, false] }],

    [{ 'color': [] }, { 'background': [] }],          // dropdown with defaults from theme
    [{ 'font': [] }],
    [{ 'align': [] }],

    ['clean'],                                         // remove formatting button

    ['link', 'image', 'video']                         // link and image, video
  ]
};
  • theme - bubble/snow, default is snow
  • placeholder - placeholder text, default is Insert text here ...

Outputs

  • onEditorCreated - editor instance
  • onContentChanged - text is updated
{
  editor: this.quillEditor,
  html: html,
  text: text
}

FAQs

Last updated on 12 Dec 2016

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