How to input only Bangla text. — An input tool for bangla language
Comment (2)
Admin
🏥 Tutorial
This section is a brief guide about how to integrate jquery.bangla in you application.
⮯ Installation
There are several ways to install this tool into your website.
First way (🖧CDN): You can integrate it directly into your html. Add the following script tags:
- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.js"></script>
- <script src="https://cdn.jsdelivr.net/npm/jquery.bangla@1/dist/jquery.bangla.js"></script>
😊 Usage
The input tool works in three different kinds of elements: input textarea and contenteditable divs (In fact, any type of element that has keydown events and selection range should be okay, but I have not tested them).
Suppose, you have a textarea in your web-page like this one:
<textarea id="text-area" placeholder="Start typing in bangla"></textarea>
To enable bangla typing inside this element, you have to initialize it first:
$('#text-area').bangla({ enable: true });
The function .bangla() accepts a config object, but it will also work without any parameters. You will find the list of available configs here.
If you wish to toggle, disable, or enable bangla typing you can pass the following parameters:
- $('#text-area').bangla('toggle'); // toggles the current input mode
- $('#text-area').bangla('on'); // enables bangla
- $('#text-area').bangla('off'); // disables bangla
- $('#text-area').bangla('enable'); // returns the enable status
- $('#text-area').bangla('enable', true); // same as .bangla('on')
- $('#text-area').bangla('enable', false); // same as .bangla('off')
💡 Live demo
You can go visit and test this new tool right away at this Click here
Thanks.
Comments (2)
jetbuzz - 3 months ago.
Thanks on your marvelous posting! I actually enjoyed reading it, you may be a great author.I will be sure to bookmark your blog and definitely will come back at some point. I want to encourage you to definitely continue your great writing, have a nice evening!
mostplay bet - 3 months ago.
Hi! This post couldn't be written any better! Reading this post reminds me of my old room mate! He always kept chatting about this. I will forward this page to him. Pretty sure he will have a good read. Thanks for sharing!
Your Comment