<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>squeezetext UI Component</title><link>https://community.telligent.com/community/13/w/api-documentation/75828/squeezetext-ui-component</link><description>&lt;p&gt;&lt;span&gt;Developing on Verint Community? Use the API documentation as a reference for all supported interactions with Verint Community.&lt;/span&gt;&lt;/p&gt;</description><dc:language>en-US</dc:language><generator>14.0.0.586 14</generator><item><title>squeezetext UI Component</title><link>https://community.telligent.com/community/13/w/api-documentation/75828/squeezetext-ui-component</link><pubDate>Fri, 08 Mar 2024 17:52:21 GMT</pubDate><guid isPermaLink="false">2bf9f2ca-f547-47d4-a1ef-6ba73b2352b5</guid><dc:creator>Ben Tiedt</dc:creator><comments>https://community.telligent.com/community/13/w/api-documentation/75828/squeezetext-ui-component#comments</comments><description>Current Revision posted to API Documentation by Ben Tiedt on 03/08/2024 17:52:21&lt;br /&gt;
&lt;hr class="generated-documentation-start" style="border-width:0;" /&gt;&lt;h3&gt;jQuery.telligent.evolution.ui.components.squeezetext&lt;/h3&gt;
&lt;p&gt;[[ui JavaScript API Module|UI Component]] which enables text to be squeezed to fit exactly within a defined width before truncation using [[evolutionSqueezeText jQuery Plugin|evolutionSqueezeText]]. The default implementation uses the [[evolutionSqueezeText jQuery Plugin|evolutionSqueezeText plugin]]. [[ui JavaScript API Module|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.&lt;/p&gt;
&lt;h3&gt;Options&lt;/h3&gt;
&lt;p&gt;Data made available to instances of the component:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;minsize&lt;/code&gt;: Minimum font size to use before truncation, in pixels
&lt;ul&gt;
&lt;li&gt;default: 9&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;minspacing&lt;/code&gt;: : Minimum letter-spacing to use before truncation, in pixels
&lt;ul&gt;
&lt;li&gt;default: -0.5&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;enablespacing&lt;/code&gt;: When enabled, includes letter spacing adjustment attempts when squeezing
&lt;ul&gt;
&lt;li&gt;default: true&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;resetonfailure&lt;/code&gt;: When enabled, text that cannot be squeezed within a container is reset to its original font size and letter spacing
&lt;ul&gt;
&lt;li&gt;default: false&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;truncateonfailure&lt;/code&gt;: When enabled, text that cannot be squeezed within a container is truncated
&lt;ul&gt;
&lt;li&gt;default: true&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Example&lt;/h3&gt;
&lt;h4&gt;Static Example using ui-masonry&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&amp;quot;ui-squeezetext&amp;quot; data-minsize=&amp;quot;10&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;
    The quick brown fox jumped over the lazy dog.
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Default Implementation&lt;/h3&gt;
&lt;p&gt;For reference purposes or as the basis for an override:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;jQuery.telligent.evolution.ui.components.squeezetext = {
    setup: function() {},
    add: function(elm, options) {
        $(elm).evolutionSqueezeText({
            &amp;#39;minSize&amp;#39;: (parseFloat(options.minsize) || $.fn.evolutionSqueezeText.defaults.minSize),
            &amp;#39;minSpacing&amp;#39;: (parseFloat(options.minspacing) || $.fn.evolutionSqueezeText.defaults.minSpacing),
            &amp;#39;enableSpacing&amp;#39;: (options.enablespacing !== undef ? options.enablespacing === &amp;#39;true&amp;#39; : $.fn.evolutionSqueezeText.defaults.enableSpacing),
            &amp;#39;resetOnFailure&amp;#39;: (options.resetonfailure !== undef ? options.resetonfailure === &amp;#39;true&amp;#39; : $.fn.evolutionSqueezeText.defaults.resetOnFailure),
            &amp;#39;truncateOnFailure&amp;#39;: (options.truncateonfailure !== undef ? options.truncateonfailure === &amp;#39;true&amp;#39; : $.fn.evolutionSqueezeText.defaults.truncateOnFailure),
            &amp;#39;onFailure&amp;#39;: function() {
                $(this).attr(&amp;#39;data-tip&amp;#39;, $(this).text()).evolutionTip();
            }
        });
    }
};
&lt;/code&gt;&lt;/pre&gt;

&lt;hr class="generated-documentation-end" style="border-width:0;" /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>