Inline content assist for text fields and areas

作者: nick 分类: css, html, js 发布时间: 2010-06-18 11:46 ė 6没有评论

Sergey Chikuyonok has created a really nice, easy to use, and good looking content assist library for input text fields and text areas:

It calculates precise position of characters in or
tag and places completion proposals popup under it. You can explicitly call popup window to assist/replace word (depends on caret position) with Ctrl+Space (buggy in Firefox and Opera) or Alt+Space (buggy in Opera). The project is based on Eclipse IDE’s content assist architecture, it has some common class names and methods. The default implementation works with fixed words vocabulary, but developers can easily modify or extend some classes to match their needs.

The API is easy to use. For example:

JAVASCRIPT:

var words = ‘after,any,also,around,another,ask,again,air,away,animal,answer,america,awesome,amazing’.split(‘,’);
new BasicContentAssist(document.getElementById(‘input’), words, {visible_items: 5});

本文出自 传播、沟通、分享,转载时请注明出处及相应链接。

本文永久链接: https://www.nickdd.cn/?p=771

发表评论

您的电子邮箱地址不会被公开。

Ɣ回顶部