
Product
Socket Now Supports pylock.toml Files
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
textcomplete
Advanced tools
Autocomplete for textarea elements.
Distributed scripts are self-contained.
To require as npm package, textcomplete requires the following to run:
Textcomplete is easiest to use when installed with npm:
npm install --save textcomplete
Then you can load the module into your code with require
call:
var { Textcomplete, Textarea } = require('textcomplete');
The Textarea
object is a kind of editor class. An editor encapsulates an HTML element where users input text. The Textarea
editor is an editor for textarea element.
You can find some additional editors at List of editors wiki.
The Textcomplete
is the core object of textcomplete.
var editor = new Textarea(textareaElement);
var textcomplete = new Textcomplete(editor);
Register series of autocomplete strategies:
textcomplete.register([{
// Emoji strategy
match: /(^|\s):(\w+)$/,
search: function (term, callback) {
callback(emojies.filter(emoji => { return emoji.startsWith(term); }));
},
replace: function (value) {
return '$1:' + value + ': ';
}
}, {
// Another strategy
...
}]);
Now, the textcomplete
listens keyboard event on the editor
and render autocomplete dropdown when one of the strategy matches to the inputted value.
Chrome | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|
Current | Current | 10+ | Current | Current |
If your project is using npm, you can install textcomplete package by npm
command:
npm install --save textcomplete
if not, you can download released packages from the release page which contain bundled scripts in dist
directory.
To contribute to textcomplte, clone this repo locally and commit your code on a separate branch. Please write unit tests for your code, and run the linter before opening a pull-request:
npm test # run linter and all tests
You can find more detail in our contributing guide.
The MIT License
[0.18.2] 2020-06-10
FAQs
Autocomplete for textarea elements
The npm package textcomplete receives a total of 3,564 weekly downloads. As such, textcomplete popularity was classified as popular.
We found that textcomplete demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.
Research
Security News
Malicious Ruby gems typosquat Fastlane plugins to steal Telegram bot tokens, messages, and files, exploiting demand after Vietnam’s Telegram ban.