This javascript module is used to help web developers apply the functionality of typing Dari/Persian language without any need to change the system language.
To Use:
<input lang="dr" type="text"/>
<textarea lang="dr"></textarea>
<div contenteditable="true" lang="dr"></div>
and add a reference in your html file to the TypeDariPersian.js
<script type="text/javascript" src="path/to/folder/TypeDariPersian.js"></script>
For this module to work perfectly the input/textarea element needs to have an attribute of lang="dr".
This module will itself make the input box's text align right to left so that it is shown properly in the input box.
This module assumes that the keyboard structure of your computer is as of the following image.