{"id":13770152,"url":"https://github.com/trinhtam/editorjs-hyperlink","last_synced_at":"2025-05-11T02:35:09.829Z","repository":{"id":51093483,"uuid":"311134119","full_name":"trinhtam/editorjs-hyperlink","owner":"trinhtam","description":"Link with target \u0026 rel attribute for Editor.js","archived":false,"fork":false,"pushed_at":"2023-11-21T04:41:07.000Z","size":362,"stargazers_count":32,"open_issues_count":12,"forks_count":30,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-05-19T14:30:47.354Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trinhtam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-11-08T19:04:48.000Z","updated_at":"2024-04-02T06:29:18.000Z","dependencies_parsed_at":"2024-01-06T20:54:39.357Z","dependency_job_id":null,"html_url":"https://github.com/trinhtam/editorjs-hyperlink","commit_stats":{"total_commits":12,"total_committers":4,"mean_commits":3.0,"dds":"0.33333333333333337","last_synced_commit":"4ada6b531a5478b426f062f576aaab9e3b8042b9"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trinhtam%2Feditorjs-hyperlink","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trinhtam%2Feditorjs-hyperlink/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trinhtam%2Feditorjs-hyperlink/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trinhtam%2Feditorjs-hyperlink/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trinhtam","download_url":"https://codeload.github.com/trinhtam/editorjs-hyperlink/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225008465,"owners_count":17406289,"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":[],"created_at":"2024-08-03T17:00:34.800Z","updated_at":"2024-11-17T06:30:29.032Z","avatar_url":"https://github.com/trinhtam.png","language":"JavaScript","funding_links":[],"categories":["Tools"],"sub_categories":["Inline Tools"],"readme":"![](https://badgen.net/badge/Editor.js/v2.0/blue)\n\n# Hyperlink Tool\n\nA tool link with target \u0026 rel attribute for [Editor.js](https://editorjs.io).  \n\n![Screen Shot 2020-11-08 at 23 51 36](https://user-images.githubusercontent.com/22043198/98481955-acee3900-2230-11eb-8b9d-a76439dc258e.png)\n\n![Screen Shot 2020-11-08 at 23 51 43](https://user-images.githubusercontent.com/22043198/98481956-afe92980-2230-11eb-9a84-f22149befbc0.png)\n\n![Screen Shot 2020-11-08 at 23 52 04](https://user-images.githubusercontent.com/22043198/98481957-b11a5680-2230-11eb-9356-5e956f1f8d35.png)\n\n## Installation\n\n### Get the package via NPM\n\n```shell\nnpm i editorjs-hyperlink -D\n```\n### or via Yarn\n\n```shell\nyarn add editorjs-hyperlink -D\n```\n\nInclude module at your application\n\n```javascript\nconst Hyperlink = require('editorjs-hyperlink');\n```\n\n## Usage\nAdd a new Tool to the `tools` property of the Editor.js initial config.\n\n```javascript\nvar editor = EditorJS({\n  ...\n  \n  tools: {\n    ...\n\n    hyperlink: {\n      class: Hyperlink,\n      config: {\n        shortcut: 'CMD+L',\n        target: '_blank',\n        rel: 'nofollow',\n        availableTargets: ['_blank', '_self'],\n        availableRels: ['author', 'noreferrer'],\n        validate: false,\n      }\n    },\n\n    ...\n  },\n\n  ...\n\n  i18n: {\n    toolNames: {\n      Hyperlink: 'Link'\n    },\n    tools: {\n      hyperlink: {\n        Save: 'Salvar',\n        'Select target': 'Seleziona destinazione',\n        'Select rel': 'Wählen rel'\n      }\n    }\n  }\n  \n  ...\n});\n```\n\n## Config Params (optional)\n\n| Field  | Type     | Description      |\n| ------ | -------- | ---------------- |\n| shortcut  | `string` | Shortcut, defaults to 'CMD+L' |\n| target | `string` | Defines a default target, defaults to null |\n| rel | `string` | Defines a default rel, defaults to null |\n| availableTargets | `string[]` | Available link targets, defaults to all targets.\u003cbr\u003eIf empty array is provided, the control will be hidden and the default value applied. |\n| availableRels | `string[]` | Available link rels, defaults to all rels.\u003cbr\u003eIf empty array is provided, the control will be hidden and the default value applied. |\n| validate | `boolean` | Defines if an URL should be validated on saving |\n\n\n## License\n[MIT](https://tamit.info)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrinhtam%2Feditorjs-hyperlink","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrinhtam%2Feditorjs-hyperlink","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrinhtam%2Feditorjs-hyperlink/lists"}