View on GitHub


Light Tag Handler is a light jquery plugin, you can use it by import a js file and add some simple html code only.

Download this project as a .zip file Download this project as a tar.gz file

Let's try a demo first:

Let input a list of words and separate by comma at the text input box shown below, for example, you can input something like : apply,mango,pear, (<- type them, but not copy and paste) to type:

An input box with initial value "1,2,3,4,5,6":
An input box with initial value "x,y,z":
An empty input box:

*Remark: if you input something wrong and what to remove the existing tags, you can simply click on the tag to remove it.

Browser Supported

  • - Internet Explorer 9 +
  • - Google Chrome
  • - FireFox

How to make it works ?

1) Import Javascript file

Import the jQuery file and lth_jquery.js (or the modified javascript file lth_jquery.min.js) first

<script type="text/javascript" src=""></script>
<script type="text/javascript" src="lth_jquery.js"></script>

2) Import Javascript file

Add a text input with class "lth_hidden" placing in a div tag with lth_group class.

<div class="lth_group">
    <input type="text" name="demo_3" class="lth_hidden" />

If your page get more than one text input box with tag handler, you can just copy a few more set of the html shown above and edit the name attribute value (for example: demo_3) to make it works. The html code of the demonstration example in this page is shown below:

<div class="lth_group">
    <input type="text" name="demo_1" class="lth_hidden" value="1,2,3,4,5,6" />
<div class="lth_group">
    <input type="text" name="demo_2" class="lth_hidden" value="x,y,z" />
<div class="lth_group">
    <input type="text" name="demo_3" class="lth_hidden" />

Input string and output string example

Input stringOutput stringDescription
" ,"""Enter space and comma, get nothing and won't make any tag
",a, ,b,,""a,b"Would remove all empty tag in output string.
"apply, mango, pear,""apply,mango,pear"This plugin would remove all space next to commas.


Make inline style to valuable.
Config Style.
Add instruction and demonstration page.
Ligth tag handler v1.0 release