在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:wikimedia/jquery.ime开源软件地址:https://github.com/wikimedia/jquery.ime开源编程语言:JavaScript 99.5%开源软件介绍:jQuery.IMEjQuery.IME is a jQuery based input method editor library supporting more than 220 input methods across more than 120 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 startgit clone https://github.com/wikimedia/jquery.ime.git Load the necessary scripts: <link href="../css/jquery.ime.css" rel="stylesheet" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js" ></script>
<script src="../src/jquery.ime.js"></script>
<script src="../src/jquery.ime.selector.js"></script>
<script src="../src/jquery.ime.preferences.js"></script>
<script src="../src/jquery.ime.inputmethods.js"></script> 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 Language selection APIInstead 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
- 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
Browser extensionsThis input tool is also available as a Chrome extension: For DevelopersRead 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 LicenseThis project is dual licensed with GPLv2+ and MIT license. See the license files in the source code for more details. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论