Verint | Telligent Community
Verint | Telligent Community
  • Site
  • User
  • Site
  • Search
  • User
Verint Community 12.x
  • Verint Community
Verint Community 12.x
API Documentation squeezetext UI Component
  • 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
      • +JavaScript API Modules
      • +jQuery Events
      • +jQuery Plugins
      • -UI Components
        • bookmark UI Component
        • code UI Component
        • collapseexpand UI Component
        • feature UI Component
        • html UI Component
        • Idea Voting UI Component
        • like UI Component
        • links UI Component
        • loading UI Component
        • masonry UI Component
        • moderate UI Component
        • page UI Component
        • poll UI Component
        • previewhtml UI Component
        • rate UI Component
        • resizedimage UI Component
        • scheduledfile UI Component
        • searchresult UI Component
        • select UI Component
        • squeezetext UI Component
        • tag UI Component
        • theater UI Component
        • tip UI Component
        • tourtip UI Component
        • viewhtml UI Component
        • webpreview UI Component
    • +Dynamic Configuration
    • +LESS Functions
    • +Script API Types
    • +Script APIs

squeezetext UI Component


jQuery.telligent.evolution.ui.components.squeezetext

UI Component which enables text to be squeezed to fit exactly within a defined width before truncation using evolutionSqueezeText. The default implementation uses the evolutionSqueezeText plugin. Overrides can be provided at the theme level. Text that is too long to squeeze is truncated and provided with a tool tip to show the full content.

Options

Data made available to instances of the component:

  • minsize: Minimum font size to use before truncation, in pixels
    • default: 9
  • minspacing: : Minimum letter-spacing to use before truncation, in pixels
    • default: -0.5
  • enablespacing: When enabled, includes letter spacing adjustment attempts when squeezing
    • default: true
  • resetonfailure: When enabled, text that cannot be squeezed within a container is reset to its original font size and letter spacing
    • default: false
  • truncateonfailure: When enabled, text that cannot be squeezed within a container is truncated
    • default: true

Example

Static Example using ui-masonry

<div class="ui-squeezetext" data-minsize="10" style="width:300px">
    The quick brown fox jumped over the lazy dog.
</div>

Default Implementation

For reference purposes or as the basis for an override:

jQuery.telligent.evolution.ui.components.squeezetext = {
    setup: function() {},
    add: function(elm, options) {
        $(elm).evolutionSqueezeText({
            'minSize': (parseFloat(options.minsize) || $.fn.evolutionSqueezeText.defaults.minSize),
            'minSpacing': (parseFloat(options.minspacing) || $.fn.evolutionSqueezeText.defaults.minSpacing),
            'enableSpacing': (options.enablespacing !== undef ? options.enablespacing === 'true' : $.fn.evolutionSqueezeText.defaults.enableSpacing),
            'resetOnFailure': (options.resetonfailure !== undef ? options.resetonfailure === 'true' : $.fn.evolutionSqueezeText.defaults.resetOnFailure),
            'truncateOnFailure': (options.truncateonfailure !== undef ? options.truncateonfailure === 'true' : $.fn.evolutionSqueezeText.defaults.truncateOnFailure),
            'onFailure': function() {
                $(this).attr('data-tip', $(this).text()).evolutionTip();
            }
        });
    }
};

  • 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