Verint | Telligent Community
Verint | Telligent Community
  • Site
  • User
  • Site
  • Search
  • User
Verint Community 11.x
  • Verint Community
Verint Community 11.x
API Documentation hashtags Composer Plugin
  • User Documentation
  • Ask the Community
  • API Documentation
  • Manager Training
  • Developer Training
  • Tags
  • More
  • Cancel
  • New
  • API Documentation
  • +In-Process API Documentation
  • +Plugin API Documentation
  • +REST API Documentation
  • -Widget, Theme, and Automation APIs
    • +Automation Events
    • -Client-side APIs
      • +Client Messages
      • -Composer Plugins
        • autocomplete Composer Plugin
        • hashtags Composer Plugin
        • mentions Composer Plugin
        • urlhighlight Composer Plugin
      • +JavaScript API Modules
      • +jQuery Events
      • +jQuery Plugins
      • +UI Components
    • +Dynamic Configuration
    • +LESS Functions
    • +Script API Types
    • +Script APIs

hashtags Composer Plugin


Hashtag Composer Plugin

Composer plugin which adds hashtag support.

Usage

Like other Composer plugins, it can be declared in the list of plugins when instantiating a composer

$('textarea.selector').evolutionComposer({
    plugins: ['hashtags']
    // extra options supported by the hashtag plugin
});

Options

  • onTagList: function which is called to asynchronously provide suggested type-ahead results during hashtag composition
    • parameters:
      • query: string query
      • complete: function to be called to pass the results back to the composer. Should be passed an array of objects with name and token keys on each.
    • default: This is automatically supplied globally by Evolution, but can be overridden
  • highlightClass: class name to apply to the hashtag to differentiate it from surrounding text.
    • default: 'composer-hashtag-highlight'

Default onTagList implementation:

This is automatically supplied globally by Evolution, but can be overridden:

onTagList: function(query, complete) {
    $.telligent.evolution.get({
        url: $.telligent.evolution.site.getBaseUrl() + 'api.ashx/v2/hashtags.json?IncludeFields=Token,PreviewHtml',
        data: {
            QueryText: query,
            PageSize: 5
        },
        cache: false,
        dataType: 'json',
        success: function(response) {
            if(response.HashTags && response.HashTags.length > 0) {
                var results = $.map(response.HashTags, function(tag) {
                    return { name: tag.PreviewHtml, token: tag.Token };
                });
                complete(results);
            } else {
                complete(null);
            }
        }
    });
}

  • Share
  • History
  • More
  • Cancel
Related
Recommended
  • Telligent
  • Professional Services
  • Submit a Support Ticket
  • Become a Partner
  • Request a Demo
  • Contact Us

About
Privacy Policy
Terms of use
Copyright 2024 Verint, Inc.
Powered by Verint Community