Giter Club home page Giter Club logo

tagmate's Introduction

TAGMATE!

A jQuery plugin for capturing tags within textareas (Facebook / Twitter style).

AUTHORS

FEATURES

  • Supports #hash tags, @name tags, and $price tags out of the box.
  • Inline autocomplete similar to jQuery UI autocomplete plugin.
  • reate custom tag parsing rules.
  • EXPERIMENTAL inline tag higlighting mode.

REQUIRES

EXAMPLE

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript" src="./jquery.fieldselection.js"></script>
<script type="text/javascript" src="./jquery.scrollTo.js"></script>
<script type="text/javascript" src="./jquery.tagmate.js"></script>
<script type="text/javascript">
    $(function() {
        $("#myTextarea").tagmate();
        $("#myForm").submit(function() {
            var tags = $("#myTextarea").getTags();
            alert(tags);
            return false;
        });
    });
</script>
<form id="myForm">
    <textarea id="myTextarea"></textarea>
    <input type="submit"/>
</form>

OPTIONS

  • exprs - Mapping of tag keys to regular expression rules.
    • Example: { '#': '\\w+' }
    • Default: Tagmate.DEFAULT_EXPRS
  • sources - Mapping of tag keys to autocomplete suggestions. Value can be an array or a function.
    • Example: { '@': [{label:'Mr. Foo',value:'foo'}] }
  • capture_tag - Callback fired when tags are captured.
    • Example: function(tag) { alert('Got tag: ' + tag); }
  • replace_tag - Callback fired when tag is replaced.
    • Example: function(tag, label) { alert('replaced:' + tag + ' with: ' + label); }
  • menu_class - CSS class to add to the menu.
    • Default: "tagmate-menu".
  • menu_option_class - CSS class to add to menu options.
    • Default: "tagmate-menu-option"
  • menu_option_active_class - CSS class to use when menu option is active.
    • Default: "tagmate-menu-option-active"
  • highlight_tags - EXPERIMENTAL! Enable at your own risk! Highlights tags by placing a div behind the transparent textarea.
    • Default: false
  • highlight_class - CSS class to use for highlighted tags.
    • Default: "tagmate-highlight"

tagmate's People

Contributors

bitdrift avatar

Watchers

Inno avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.