Skip to content

SmallImprovements/quill-auto-links

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quill Auto Links Module

A module for the Quill Rich Text Editor to transform http links (typed or pasted) to <a> tags automatically.

Demo

Plunker

Usage

import Quill from 'quill';
import AutoLinks from 'quill-auto-links';

Quill.register('modules/autoLinks', AutoLinks);

const quill = new Quill(editor, {
  modules: {
    autoLinks: true
  }
});

Options

  • paste Enable link formatting when pasting text - defaults to true
  • type Enable link formatting when typing text - defaults to true

Examples:

// Enable for pasting and typing
const quill1 = new Quill(editor, {
  modules: {
    autoLinks: true
  }
});

// Disable for pasting and typing
const quill2 = new Quill(editor, {
  modules: {
    autoLinks: {
      paste: false,
      type: false
    }
  }
});


// Disable for pasting, but enable for typing

const quill3 = new Quill(editor, {
  modules: {
    autoLinks: {
      paste: false,
      type: true
    }
  }
});

Small Improvements

About

Automatically convert links in Quill

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published