{"id":51186157,"url":"https://github.com/jkhaui/predictable","last_synced_at":"2026-06-27T10:02:50.919Z","repository":{"id":39437208,"uuid":"200000038","full_name":"jkhaui/predictable","owner":"jkhaui","description":"A contenteditable text editor with predictive typeahead, similar to Gmail's Smart Compose feature.","archived":false,"fork":false,"pushed_at":"2023-01-04T06:15:07.000Z","size":5539,"stargazers_count":83,"open_issues_count":26,"forks_count":20,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-03-15T16:07:54.105Z","etag":null,"topics":["autocomplete","contenteditable","gmail","lookahead","predictive-text","smart-compose","typeahead"],"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/jkhaui.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}},"created_at":"2019-08-01T07:27:14.000Z","updated_at":"2025-12-11T10:14:15.000Z","dependencies_parsed_at":"2023-02-02T00:45:52.956Z","dependency_job_id":null,"html_url":"https://github.com/jkhaui/predictable","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jkhaui/predictable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkhaui%2Fpredictable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkhaui%2Fpredictable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkhaui%2Fpredictable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkhaui%2Fpredictable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jkhaui","download_url":"https://codeload.github.com/jkhaui/predictable/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkhaui%2Fpredictable/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34848932,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-27T02:00:06.362Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["autocomplete","contenteditable","gmail","lookahead","predictive-text","smart-compose","typeahead"],"created_at":"2026-06-27T10:02:50.412Z","updated_at":"2026-06-27T10:02:50.909Z","avatar_url":"https://github.com/jkhaui.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003ePredictable\u003c/h1\u003e\n\n_Predictable_ is a basic PoC web app to demonstrate how predictive text/autocomplete/lookahead/typeahead\ncan be applied to a contenteditable element. This functionality is seen in real-world apps, with the \nseminal example being Gmail's \"Smart Compose feature\". Pressing the Tab key will autocomplete a suggested\nphrase.\n\u003cbr /\u003e\n\u003ch3\u003eQuick Start\u003c/h3\u003e\n\u003e `git clone https://github.com/jkhaui/predictable`\n\u003cbr /\u003e\n\u003e `npm install`\n\u003cbr /\u003e\n\u003e `npm start`\n\n\u003cbr /\u003e\nThis project is bootstrapped with create-react-app. It also uses Medium-Editor as a solid\nbase for contenteditable. However, neither React nor Medium-Editor are tightly coupled to\nPredictable's functionality, which is written in vanilla JS and can easily be modified to work with \nany contenteditable container.\n\u003cbr /\u003e\n\u003cbr /\u003e\nN.b. Being a simple PoC, there are some obvious bugs. E.g. The first word of the text editor\nin Chrome is, for some strange reason, positioned differently to the rest of the text. This causes the\nautocomplete placeholder to appear misaligned if applied at the very beginning of a document.\n\n\u003cbr /\u003e\n\u003cbr /\u003e\nThis example uses a large corpus of phrases related to the legal domain, but they can be easily swapped\nout for another data source. Improvements and PRs are highly welcomed.\n\u003cbr /\u003e\nDemo:\n\n\u003cimg src=\"http://bit.ly/2LRQ5Nc\" /\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkhaui%2Fpredictable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjkhaui%2Fpredictable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkhaui%2Fpredictable/lists"}