quill-auto-detect-url
v1.0.0-alpha.1
Published
quill auto detect url
Downloads
2,725
Readme
quill-auto-detect-url
This module is based on quill-magic-url
It was created to transform the url of the url as the user types.
This library supports Quill Version 2 starting from version 1
Demo
Install
yarn add quill-auto-detect-url
// or
npm install quill-auto-detect-url
Usage
import Quill from "quill";
import QuillAutoDetectUrl, {
QuillAutoDetectUrlOptions,
} from "quill-auto-detect-url";
Quill.register("modules/autoDetectUrl", QuillAutoDetectUrl);
const quill = new Quill("#editor", {
theme: "snow",
modules: {
autoDetectUrl: {
urlRegularExpression: /(https?:\/\/|www\.)[\w-.]+\.[\w-.]+[\S]+/i,
} as QuillAutoDetectUrlOptions, // or true
},
});
Options
please see magic-url docs