4

I am wondering if there is a prebuilt clone (or very similar) to the Stack Overflow tagging system.

I have done some Googling however cannot find any powered by jquery.

Mureinik
  • 252,575
  • 45
  • 248
  • 283
Hailwood
  • 79,753
  • 103
  • 257
  • 412
  • who voted to close this with no comment? – Hailwood Feb 02 '11 at 00:16
  • possible duplicate of [How can I set up JQuery autocomplete like Stackoverflow's tags input field?](http://stackoverflow.com/questions/519107/how-can-i-set-up-jquery-autocomplete-like-stackoverflows-tags-input-field) – Dave Jarvis Jun 22 '12 at 04:51
  • Something like this: [http://blog.crazybeavers.se/wp-content/Demos/jquery.tag.editor/](http://blog.crazybeavers.se/wp-content/Demos/jquery.tag.editor//) – bpeterson76 Feb 01 '11 at 23:30

2 Answers2

6

Here is my implementation (which I think is much more true to the SO style than is the accepted answer). The style may need tweaking but it's functionally the same as you see on SO.

Features:

  • Takes a predefined input field with words separated by commas -- perfect for all cases such as those in which you are editing an item that already has tags -- and builds the interactive tag editor from this information.

    example in rails format:

     <input id="post_tag_list" name="post[tag_list]" value='testing, test, probably, goose, under_score'/>
    
  • Updates a hidden input field as the user edits tags so that the submitted form will have all desired tags.

  • Deleting backwards through the (fake) tag input field is functionally the same as deleting one long string of words, making editing more natural.

  • Tags can be clicked on to edit.

  • Commas, spaces, returns, and tabs close an open tag that is being edited or created.

  • Close button on tags functions as expected.

  • etc.

Find it here: http://jsfiddle.net/bradleygriffith/axjKm/

bradleygriffith
  • 889
  • 1
  • 11
  • 23
  • Have you gotten anywhere with an auto-complete for this? – SeanWM May 10 '13 at 12:36
  • Also, any idea why it doesn't work well in older versions of IE? I like the tagging so I want to use it but just wondering about these couple things. – SeanWM May 10 '13 at 13:12
  • Sorry @SeanWM, I haven't had time to look into either of these things. Id be interested in knowing what is wrong with the code in older versions of IE, so if you sort that out, please drop me a line. – bradleygriffith Aug 19 '13 at 20:58
3

I ended up building my own implementation:

http://webspirited.com/tagit/index.php?themeroller=true#demo8

Hailwood
  • 79,753
  • 103
  • 257
  • 412
  • great work. I am planing to use it in my project. Want to now does it support database functionality? I will use php-mysql in backend. – Rocx Feb 04 '16 at 10:21