Skip to content

A jQuery plugin that gives your input controls the ability to change direction according to the input language by the user,

Notifications You must be signed in to change notification settings

mpcabd/Auto-Input-Text-Direction

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

Auto Input Text Direction

A jQuery plugin that gives your input controls the ability to change direction according to the input language by the user, so when he writes Arabic text the input will change its text direction to rtl (right to left), and when he writes in any other langugage the input will change its text direction to ltr (left to right).

Arabic is not the only language that is written from right to left, you can check this list for right to left languages, and the code can be easily extended to support these languages.

This project is a fork from the original project here that introduces the following changes:

  • Direction will be changed according to the number of characters, so if the Arabic characters are more than other characters the text will change its direction to rtl, but if the Arabic characters are less than other characters the text will be ltr.
  • A jQuery plugin that makes it easy to use this library with your JavaScript code:
$('input.bidirectional').automaticDirection();

License

This work is licensed under GNU General Public License v3.

Contact

  • Abd Allah Diab (mpcabd)
  • Email: mpcabd {AT} G Mail (dot) COM
  • Blog: http://mpcabd.xyz

About

A jQuery plugin that gives your input controls the ability to change direction according to the input language by the user,

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%