Giter Site home page Giter Site logo

jquery.ime's Introduction

jQuery.IME

jQuery.IME is a jQuery based input method editor library supporting more than 135 input methods across more than 62 languages.

These input methods are well tested. Initially the input methods were contributed by the Wikimedia community. By now many input methods have also been contributed by Red Hat.

This project is a Wikimedia foundation initiative to provide language technology tools to a wider audience outside the Wikimedia universe.

This input tool is widely deployed in all Wikimedia projects (eg: wikipedia).

Quick start

git clone https://github.com/wikimedia/jquery.ime.git

To add input method support to all editable elements:

$( 'textarea, [contenteditable], input[type=text], input[type=search], input:not([type])' ).ime();

jquery.ime provides a jquery plugin function $.fn.ime() to add input method support for any editable elements in a page.

Language selection API

Instead of using the default language selector, you can roll your own:

$myDiv= $( '.foo' );
$myDiv.ime( { showSelector: false } );
ime = $myDiv.data( 'ime' );
$elements.on( 'imeLanguageChange', function () { ... } );
$elements.on( 'imeMethodChange', function () { ... } );

currentLanguageCode = ime.getLanguage();
currentLanguageName = ime.getAutonym( currentLanguageCode );
allLanguageCodes = ime.getLanguageCodes();
inputMethods = ime.getInputMethods( currentLanguageCode );
ime.setIM( inputMethods[ 0 ].id );

See examples/ced/ced.html for a more complete example.

Running

-If you have python installed, run -bash python -m SimpleHTTPServer -

Alternatively, many programming languages provide one liner commands to start a simple http static servers. You can use any one of them.

and, you can access examples from

http://localhost:8000/examples/index.html

Alternatively you can use tools like webfsd. If you know how to use advanced web servers like Apache or Nginx, you already know how to put the code in a webserver.

Plugin Options

Option Description
imePath Relative/Absolute path for the rules folder of jquery.ime. Default value: '../'
languages Languages to be used- by default all languages. Default value: []. Eg: ['hi', 'ml']. It can also be a function returning an array.
helpHandler Called for each ime option in the menu, default value: null
showSelector Whether the input method selector to be used or not. Default value is true

Browser extensions

This input tool is also available as Firefox and Chrome extensions.

For Developers

Read rules/README.md to learn how to write an input method for a language.

Read test/README.md to learn how to write and run tests for an input method.

Read the technical specification of the project from wiki.

Do watch the code walkthrough by Chris Forno: http://www.youtube.com/watch?v=LPec-KIBVeI

License

This project is dual licensed with GPLv2+ and MIT license. See the license files in the source code for more details.

jquery.ime's People

Contributors

amire80 avatar divec avatar ebraminio avatar edg2s avatar eroux avatar gatoselvadego avatar ghybu avatar gyan111 avatar jdforrester avatar jeblad avatar jishnu7 avatar kartikm avatar mirontoli avatar mjbmr avatar mooeypoo avatar nikerabbit avatar omshivaprakash avatar pauginer avatar pnemade avatar pravee-n avatar psubhashish avatar samyakbhuta avatar santhoshtr avatar siebrand avatar singitur avatar springrollconan avatar srikanthlogic avatar vikynandha avatar xelgen avatar yuvipanda avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.