{"id":13770134,"url":"https://github.com/editor-js/link-autocomplete","last_synced_at":"2026-02-13T17:38:37.387Z","repository":{"id":47402219,"uuid":"372912364","full_name":"editor-js/link-autocomplete","owner":"editor-js","description":"An upgraded version of base inline link tool with your server's search.","archived":false,"fork":false,"pushed_at":"2023-11-18T20:09:53.000Z","size":224,"stargazers_count":35,"open_issues_count":7,"forks_count":13,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-23T04:10:20.016Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/editor-js.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}},"created_at":"2021-06-01T17:32:32.000Z","updated_at":"2025-11-20T22:55:07.000Z","dependencies_parsed_at":"2023-11-18T21:25:23.360Z","dependency_job_id":"d2dfbaee-1363-4c0f-b8ff-9d113cbcb23d","html_url":"https://github.com/editor-js/link-autocomplete","commit_stats":{"total_commits":45,"total_committers":3,"mean_commits":15.0,"dds":0.2222222222222222,"last_synced_commit":"b61d79ea406785aaf2abb21ac4a81aeeb277e010"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/editor-js/link-autocomplete","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/editor-js%2Flink-autocomplete","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/editor-js%2Flink-autocomplete/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/editor-js%2Flink-autocomplete/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/editor-js%2Flink-autocomplete/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/editor-js","download_url":"https://codeload.github.com/editor-js/link-autocomplete/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/editor-js%2Flink-autocomplete/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29413515,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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.575Z","updated_at":"2026-02-13T17:38:37.367Z","avatar_url":"https://github.com/editor-js.png","language":"JavaScript","funding_links":["http://opencollective.com/editorjs"],"categories":["Tools"],"sub_categories":["Inline Tools"],"readme":"# Link Autocomplete\n\nAn upgraded version of base inline link tool with your server's search.\n\n![](example/assets/example.png)\n\n## Installation\n\n### Install via NPM\n\nGet the package\n\n```shell\nnpm i --save-dev @editorjs/link-autocomplete\n```\n\n```shell\nyarn add -D @editorjs/link-autocomplete\n```\n\n### Load from CDN\n\nYou can use package from jsDelivr CDN.\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/@editorjs/link-autocomplete\"\u003e\u003c/script\u003e\n```\n\n## Usage\n\nAdd a new Tool to the `tools` property of the Editor.js initial config.\n\n```javascript\nvar editor = EditorJS({\n  ...\n \n  /**\n   * Tools list\n   */\n  tools: {\n    link: {\n      class: LinkAutocomplete,\n      config: {\n        endpoint: 'http://localhost:3000/',\n        queryParam: 'search'\n      }\n    }\n  },\n  \n  ...\n});\n```\n\n## Config Params\n\nSearch requests will be sent to the server by `GET` requests with a search string as a query param. \n\nList of server connection params which may be configured.\n\n`endpoint` — URL of the server's endpoint for getting suggestions.\n\n`queryParam` — param name to be sent with the search string.\n\nIf there is no `endpoint` then tool will work only for pasted links.\n\n## Server response data format\n\nFor endpoint requests server **should** answer with a JSON containing following properties:\n\n- `success` (`boolean`) — state of processing: `true` or `false`  \n- `items` (`{name: string, href: string, description?: string}`) — an array of found items. Each item *must* contain `name` and `href` params. The `description`\nparam is optional. You can also return any other fields which will be stored in a link dataset.\n\nContent-Type: `application/json`.\n\n```json\n{\n  \"success\": true,\n  \"items\": [\n    {\n      \"href\": \"https://codex.so/editor\",\n      \"name\": \"The first item\",\n      \"description\": \"\"\n    },\n    {\n      \"href\": \"https://codex.so/media\",\n      \"name\": \"The second item\",\n      \"description\": \"\"\n    }\n  ]\n}\n```\n\n## Output data\n\nMarked text will be wrapped with a `a` tag as a usual link.\n\nAdditional data will be store in element's dataset: `data-name`, `data-description` and other custom fields.\n\n```json\n{\n    \"type\" : \"text\",\n    \"data\" : {\n        \"text\" : \"Create a directory for your module, enter it and run \u003ca href=\\\"https://codex.so/\\\" data-name=\\\"CodeX Site\\\"\u003enpm init\u003c/a\u003e command.\"\n    }\n}\n```\n\n## Shortcut\n\nBy default, shortcut `CMD (CTRL) + K` is used for pasting links as usual.\n\n## I18n\n\nThere is a few phrases to be translated. \n\nUI items:\n\n- `Paste or search` — placeholder for an input field if server endpoint passed.\n- `Paste a link` — placeholder for the same field if server endpoint is missing.\n\nError messages:\n\n- `Cannot process search request because of` — message before error's text in notification for a bad server response.\n- `Server responded with invalid data` — bad server's response\n- `Link URL is invalid` — pasted link url is bad \n\n```\ni18n: {\n  messages: {\n    tools: {\n      LinkAutocomplete: {\n        'Paste or search': '...',\n        'Paste a link': '...',\n        'Cannot process search request because of': '...',\n        'Server responded with invalid data': '...',\n        'Link URL is invalid': '...'\n      }\n    }\n  }\n},\n```\n\n# Support maintenance 🎖\n\nIf you're using this tool and editor.js in your business, please consider supporting their maintenance and evolution.\n\n[http://opencollective.com/editorjs](http://opencollective.com/editorjs)\n\n# About CodeX\n\n\u003cimg align=\"right\" width=\"100\" height=\"100\" src=\"https://codex.so/public/app/img/codex-logo.svg\" hspace=\"50\"\u003e\n\nCodeX is a team of digital specialists around the world interested in building high-quality open source products on a global market. We are [open](https://codex.so/join) for young people who want to constantly improve their skills and grow professionally with experiments in leading technologies.\n\n| 🌐 | Join  👋  | Twitter | Instagram |\n| -- | -- | -- | -- |\n| [codex.so](https://codex.so) | [codex.so/join](https://codex.so/join) |[@codex_team](http://twitter.com/codex_team) | [@codex_team](http://instagram.com/codex_team) |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feditor-js%2Flink-autocomplete","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feditor-js%2Flink-autocomplete","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feditor-js%2Flink-autocomplete/lists"}