Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

quill-placeholder-autocomplete-module

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

quill-placeholder-autocomplete-module

brings autocomplete to Quill placeholder module

  • 1.0.4-1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
608
increased by11.36%
Maintainers
1
Weekly downloads
 
Created
Source

quill-placeholder-autocomplete

brings autocomplete to quill-placeholder-module

Install

  • using NPM:
    npm install --save quill-placeholder-autocomplete-module quill-placeholder-module
    
  • using yarn:
    yarn add quill-placeholder-autocomplete-module quill-placeholder-module
    

Usage

import getPlaceholderModule from 'quill-placeholder-module';
import getAutocompleteModule from 'quill-placeholder-autocomplete-module';

Quill.register('modules/placeholder', getPlaceholderModule(Quill,  { 
  className: 'ql-placeholder-content',  // default 
}));
Quill.register('modules/autocomplete', getAutocompleteModule(Quill));

const placeholders = [
  {id: 'foo', label: 'Foo'},
  {id: 'required', label: 'Required', required: true}
]

var quill = new Quill('#editor', {
  modules: {
    toolbar: {container: `#toolbar`},
    placeholder: {
      delimiters: ['{', '}'],               // default
      placeholders
    },
    autocomplete: {
      getPlaceholders: () => placeholders       // factory
      container: '#completions',               // can also be return of `document.querySelector` or keeped to `undefined`
      onOpen: () => console.log('opened'),    // optional
      onClose: (placeholder) => console.log('user choosed:', placeholder),  //optional
    }
  },
  placeholder: 'Compose an epic...',
  theme: 'snow'
});

Keywords

FAQs

Package last updated on 12 Jul 2018

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc