npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jquery.bangla

v1.3.2

Published

A versatile bangla input tool for the web

Downloads

56

Readme

Bangla Input Tools

npm (tag) Build Status NPM Downloads Maintainability License GitHub stars

A versatile bangla input tools for the web

Live Demo: https://dipu-bd.github.io/jquery.bangla/

Installation

npm i --save jquery jquery.bangla

Usage

import 'jquery.bangla';

// Or,
require('jquery.bangla');

// Then, on some editable elements...

$('input[type="text"]').bangla(); // input box

$('textarea').bangla(); // text area

$('div[contenteditable="true"]').bangla(); // content editable div

$('.note-editable').bangla() // summer-note (a free WYSWYG editor)

Usage (Browser)

  1. Clone this repository and go to project folder.
  2. Perform npm install
  3. Then npm run build
  4. Copy the script file inside dist/ folder to your static assets directory
  5. See the example in gh-pages branch for usage.

API

Initial Configuration

You an pass the following configs during initialization (all configs are optional):

// all the default values are given here
$('<some-element-selectoor>').bangla({
  enable: false,
  maxSuggestions: 10,
  disableSuggestion: false,
  storeKey: '__avro--candidates',
  store: window.localStorage,
  provider: /* see below */
})

Config: enable

Pass true to enable bangla right after initialization.

Config: maxSuggestions

The maximum number of suggestions that user will see for a word.

Config: disableSuggestion

Pass true if you do not want to display the suggestion box.

Config: storeKey

The key that is used for storing candidate words.

Config: store

The storage to save candidate words. A cadidate word is a bangla word that user had select against an english word. In the next suggestion box for that english word, the cadidate word will be automatically selected.

The store should haeve two fields:

  • getItem(key): Returns the value given the key
  • setItem(key, val): Stores the value against the key to retriee it later.

Config: provider

By default, Avro Phonetic from https://github.com/omicronlab/avro-pad is used. But you can define your own provider. A provider should have three fields.

  • suggest(word): This will return an object containing words field. The field words is an array of possible bangla word for the given english word.
  • candidate(word): This will return previously selected bangla word for the english input.
  • commit(word, bangla): It will save the candidate bangla word for an english word.

Methods

You can customize the input tool after initialization:

  • $('input').bangla('toggle'): Toggles the input option between bangla and english.
  • $('input').bangla('on'): Enables the bangla mode.
  • $('input').bangla('off'): Disables the bangla mode.
  • $('input').bangla('enable'): Get whether the bangla is enabled for a single element.
  • $('input').bangla('enable', true): Enables the bangla mode.
  • $('input').bangla('enable', false): Disable the bangla mode.
  • $('input').bangla('tool'): Access the BanglaInputTool instance for a single element.

License

Mozilla Public License Version 2.0