All Projects β†’ visualjerk β†’ quill-magic-url

visualjerk / quill-magic-url

Licence: MIT License
Automatically convert URLs to links in Quill

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to quill-magic-url

quilljs-rails
Easy integration of Quill rich editor with most Rails forms.
Stars: ✭ 33 (-61.63%)
Mutual labels:  quill, quilljs, quill-editor
Vue Quill Editor
🍑@quilljs editor component for @vuejs
Stars: ✭ 6,874 (+7893.02%)
Mutual labels:  quill, quilljs, quill-editor
ngx-linkifyjs
Angular V8 wrapper for linkifyjs - library for finding links in plain text and converting them to HTML <a> tags via linkifyjs
Stars: ✭ 40 (-53.49%)
Mutual labels:  url, links
custom-permalinks
Set custom permalinks on a per-post basis in WordPress
Stars: ✭ 17 (-80.23%)
Mutual labels:  url, link
angular quill
Angular dart component for the Quill rich text editor
Stars: ✭ 22 (-74.42%)
Mutual labels:  quill, quilljs
reachable-urls
Check URLs are reachable in text πŸ•΅οΈ
Stars: ✭ 29 (-66.28%)
Mutual labels:  url, link
Ngx Quill Editor
🍑@quilljs editor component for @angular
Stars: ✭ 234 (+172.09%)
Mutual labels:  quill, quilljs
Autolink Java
Java library to extract links (URLs, email addresses) from plain text; fast, small and smart
Stars: ✭ 157 (+82.56%)
Mutual labels:  url, links
Ngx Quill Example
demo app for the advanced usage of ngx-quill module
Stars: ✭ 137 (+59.3%)
Mutual labels:  quill, quilljs
ngx-quill-lite
A light weight Angular wrapper of Quilljs, powerful rich text editor
Stars: ✭ 20 (-76.74%)
Mutual labels:  quilljs, quill-editor
vue-link
One component to link them all πŸ”—
Stars: ✭ 65 (-24.42%)
Mutual labels:  links, link
Vue2 Editor
A text editor using Vue.js and Quill
Stars: ✭ 2,316 (+2593.02%)
Mutual labels:  quill, quilljs
Flutter Quill
Rich text editor for Flutter
Stars: ✭ 177 (+105.81%)
Mutual labels:  quill, quilljs
Recursos Gratuitos
🌈 Uma coleção com links de recursos gratuitos para desenvolvimentos e estudos.
Stars: ✭ 1,353 (+1473.26%)
Mutual labels:  links, link
Quill Better Table
Module for better table in Quill, more useful features are supported.
Stars: ✭ 175 (+103.49%)
Mutual labels:  quill, quilljs
React Native Hyperlink
A <Hyperlink /> component for react-native that makes urls, fuzzy links, emails etc clickable
Stars: ✭ 572 (+565.12%)
Mutual labels:  url, link
URL-Shortner-Bot-V2
A link shortner telegram bot version 2 with advanced features
Stars: ✭ 18 (-79.07%)
Mutual labels:  url, link
Yii2 Quill
Yii 2 implementation of Quill, modern WYSIWYG editor
Stars: ✭ 52 (-39.53%)
Mutual labels:  quill, quilljs
Ngx Quill
Angular (>=2) components for the Quill Rich Text Editor
Stars: ✭ 1,382 (+1506.98%)
Mutual labels:  quill, quilljs
link text
Easy to use text widget for Flutter apps, which converts inlined urls into working, clickable links
Stars: ✭ 20 (-76.74%)
Mutual labels:  url, link

quill-magic-url

tests publish

Checks for URLs and mail addresses during typing and pasting and automatically converts them to links and normalizes the links URL.

Thanks to @LFDM for the groundwork with quill-auto-links.

You can find a demo page here.

quill-magic-url in action

Install

From CDN

<!-- After quill script includes -->
<script src="https://unpkg.com/[email protected]/dist/index.js"></script>

With NPM

npm install quill-magic-url --save
import Quill from 'quill'
import MagicUrl from 'quill-magic-url'

Quill.register('modules/magicUrl', MagicUrl)

Usage

Basic usage with default options:

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

Usage with custom options:

const quill = new Quill(editor, {
  modules: {
    magicUrl: {
      // Regex used to check URLs during typing
      urlRegularExpression: /(https?:\/\/[\S]+)|(www.[\S]+)|(tel:[\S]+)/g,
      // Regex used to check URLs on paste
      globalRegularExpression: /(https?:\/\/|www\.|tel:)[\S]+/g,
    },
  },
})

Options

urlRegularExpression

Regex used to check for URLs during typing.

Default: /(https?:\/\/|www\.)[\w-\.]+\.[\w-\.]+(\/([\S]+)?)?/gi

Example with custom Regex

magicUrl: {
  urlRegularExpression: /(https?:\/\/[\S]+)|(www.[\S]+)|(tel:[\S]+)/g
}

globalRegularExpression

Regex used to check for URLs on paste.

Default: /(https?:\/\/|www\.)[\w-\.]+\.[\w-\.]+(\/([\S]+)?)?/gi

Example with custom Regex

magicUrl: {
  globalRegularExpression: /(https?:\/\/|www\.|tel:)[\S]+/g
}

mailRegularExpression

Regex used to check for mail addresses during typing. Set to null to disable conversion of mail addresses.

Default: /([\w-\.]+@[\w-\.]+\.[\w-\.]+)/gi

Example with custom Regex

magicUrl: {
  mailRegularExpression: /([\w-\.]+@[\w-\.]+\.[\w-\.]+)/gi
}

globalMailRegularExpression

Regex used to check for mail addresses on paste. Set to null to disable conversion of mail addresses.

Default: /([\w-\.]+@[\w-\.]+\.[\w-\.]+)/gi

Example with custom Regex

magicUrl: {
  globalMailRegularExpression: /([\w-\.]+@[\w-\.]+\.[\w-\.]+)/gi
}

normalizeRegularExpression

Regex used to check for URLs to be normalized.

Default: /(https?:\/\/|www\.)[\S]+/i

You will most likely want to keep this options default value.

normalizeUrlOptions

Options for normalizing the URL

Default:

{
  stripWWW: false
}

Example with custom options

magicUrl: {
  normalizeUrlOptions: {
    stripHash: true,
    stripWWW: false,
    normalizeProtocol: false
  }
}

Available options

We use normalize-url for normalizing URLs. You can find a detailed description of the possible options here.

More infos on URL Regex

For some advanced URL Regex check this out.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].