Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A contenteditable text editor with predictive typeahead, similar to Gmail's Smart Compose feature.

NotificationsYou must be signed in to change notification settings

jkhaui/predictable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Predictable is a basic PoC web app to demonstrate how predictive text/autocomplete/lookahead/typeaheadcan be applied to a contenteditable element. This functionality is seen in real-world apps, with theseminal example being Gmail's "Smart Compose feature". Pressing the Tab key will autocomplete a suggestedphrase.

Quick Start

> `git clonehttps://github.com/jkhaui/predictable`
> `npm install`
> `npm start`
This project is bootstrapped with create-react-app. It also uses Medium-Editor as a solidbase for contenteditable. However, neither React nor Medium-Editor are tightly coupled toPredictable's functionality, which is written in vanilla JS and can easily be modified to work with any contenteditable container.

N.b. Being a simple PoC, there are some obvious bugs. E.g. The first word of the text editorin Chrome is, for some strange reason, positioned differently to the rest of the text. This causes theautocomplete placeholder to appear misaligned if applied at the very beginning of a document.

This example uses a large corpus of phrases related to the legal domain, but they can be easily swappedout for another data source. Improvements and PRs are highly welcomed.
Demo:

About

A contenteditable text editor with predictive typeahead, similar to Gmail's Smart Compose feature.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp