{"id":13535660,"url":"https://github.com/visualjerk/quill-magic-url","last_synced_at":"2025-04-02T02:31:04.793Z","repository":{"id":27770706,"uuid":"115162800","full_name":"visualjerk/quill-magic-url","owner":"visualjerk","description":"Automatically convert URLs to links in Quill","archived":false,"fork":false,"pushed_at":"2023-01-09T02:01:28.000Z","size":2490,"stargazers_count":120,"open_issues_count":8,"forks_count":41,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-23T10:04:54.307Z","etag":null,"topics":["automatic","link","links","quill","quill-editor","quilljs","url"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/visualjerk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"patreon":"visualjerk"}},"created_at":"2017-12-23T01:41:42.000Z","updated_at":"2024-05-23T10:04:54.307Z","dependencies_parsed_at":"2023-01-14T07:27:22.496Z","dependency_job_id":null,"html_url":"https://github.com/visualjerk/quill-magic-url","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visualjerk%2Fquill-magic-url","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visualjerk%2Fquill-magic-url/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visualjerk%2Fquill-magic-url/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visualjerk%2Fquill-magic-url/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/visualjerk","download_url":"https://codeload.github.com/visualjerk/quill-magic-url/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246743545,"owners_count":20826551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automatic","link","links","quill","quill-editor","quilljs","url"],"created_at":"2024-08-01T09:00:20.363Z","updated_at":"2025-04-02T02:31:04.439Z","avatar_url":"https://github.com/visualjerk.png","language":"JavaScript","funding_links":["https://patreon.com/visualjerk"],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# quill-magic-url\n\n**Looking for maintainer**: If anyone would like to take over responsibility for this plugin or create a new one for Quill 2.x, please let me know.\n\n![tests](https://github.com/visualjerk/quill-magic-url/actions/workflows/tests.yml/badge.svg) ![publish](https://github.com/visualjerk/quill-magic-url/actions/workflows/publish.yml/badge.svg)\n\nChecks for URLs and mail addresses during typing and pasting and automatically converts them to links and normalizes the links URL.\n\nThanks to [@LFDM](https://github.com/LFDM) for the groundwork with [quill-auto-links](https://github.com/SmallImprovements/quill-auto-links).\n\nYou can find a [demo page here](https://visualjerk.github.io/quill-magic-url/).\n\n![quill-magic-url in action](https://github.com/visualjerk/quill-magic-url/blob/master/docs/quill-magic-url.gif?raw=true)\n\n## Install\n\n### From CDN\n\n```html\n\u003c!-- After quill script includes --\u003e\n\u003cscript src=\"https://unpkg.com/quill-magic-url@3.0.0/dist/index.js\"\u003e\u003c/script\u003e\n```\n\n### With NPM\n\n```bash\nnpm install quill-magic-url --save\n```\n\n```javascript\nimport Quill from 'quill'\nimport MagicUrl from 'quill-magic-url'\n\nQuill.register('modules/magicUrl', MagicUrl)\n```\n\n## Usage\n\n**Basic usage with default options:**\n\n```javascript\nconst quill = new Quill(editor, {\n  modules: {\n    magicUrl: true,\n  },\n})\n```\n\n**Usage with custom options:**\n\n```javascript\nconst quill = new Quill(editor, {\n  modules: {\n    magicUrl: {\n      // Regex used to check URLs during typing\n      urlRegularExpression: /(https?:\\/\\/[\\S]+)|(www.[\\S]+)|(tel:[\\S]+)/g,\n      // Regex used to check URLs on paste\n      globalRegularExpression: /(https?:\\/\\/|www\\.|tel:)[\\S]+/g,\n    },\n  },\n})\n```\n\n## Options\n\n### urlRegularExpression\n\n\u003e Regex used to check for URLs during _typing_.\n\n**Default:** `/(https?:\\/\\/|www\\.)[\\w-\\.]+\\.[\\w-\\.]+(\\/([\\S]+)?)?/gi`\n\n**Example with custom Regex**\n\n```javascript\nmagicUrl: {\n  urlRegularExpression: /(https?:\\/\\/[\\S]+)|(www.[\\S]+)|(tel:[\\S]+)/g\n}\n```\n\n### globalRegularExpression\n\n\u003e Regex used to check for URLs on _paste_.\n\n**Default:** `/(https?:\\/\\/|www\\.)[\\w-\\.]+\\.[\\w-\\.]+(\\/([\\S]+)?)?/gi`\n\n**Example with custom Regex**\n\n```javascript\nmagicUrl: {\n  globalRegularExpression: /(https?:\\/\\/|www\\.|tel:)[\\S]+/g\n}\n```\n\n### mailRegularExpression\n\n\u003e Regex used to check for mail addresses during _typing_. Set to `null` to disable conversion of mail addresses.\n\n**Default:** `/([\\w-\\.]+@[\\w-\\.]+\\.[\\w-\\.]+)/gi`\n\n**Example with custom Regex**\n\n```javascript\nmagicUrl: {\n  mailRegularExpression: /([\\w-\\.]+@[\\w-\\.]+\\.[\\w-\\.]+)/gi\n}\n```\n\n### globalMailRegularExpression\n\n\u003e Regex used to check for mail addresses on _paste_. Set to `null` to disable conversion of mail addresses.\n\n**Default:** `/([\\w-\\.]+@[\\w-\\.]+\\.[\\w-\\.]+)/gi`\n\n**Example with custom Regex**\n\n```javascript\nmagicUrl: {\n  globalMailRegularExpression: /([\\w-\\.]+@[\\w-\\.]+\\.[\\w-\\.]+)/gi\n}\n```\n\n### normalizeRegularExpression\n\n\u003e Regex used to check for URLs to be _normalized_.\n\n**Default:** `/(https?:\\/\\/|www\\.)[\\S]+/i`\n\nYou will most likely want to keep this options default value.\n\n### normalizeUrlOptions\n\n\u003e Options for normalizing the URL\n\n**Default:**\n\n```javascript\n{\n  stripWWW: false\n}\n```\n\n**Example with custom options**\n\n```javascript\nmagicUrl: {\n  normalizeUrlOptions: {\n    stripHash: true,\n    stripWWW: false,\n    normalizeProtocol: false\n  }\n}\n```\n\n**Available options**\n\nWe use [normalize-url](https://github.com/sindresorhus/normalize-url) for normalizing URLs. You can find a detailed description of the possible options [here](https://github.com/sindresorhus/normalize-url#api).\n\n## More infos on URL Regex\n\nFor some advanced URL Regex [check this out](https://mathiasbynens.be/demo/url-regex).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvisualjerk%2Fquill-magic-url","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvisualjerk%2Fquill-magic-url","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvisualjerk%2Fquill-magic-url/lists"}