Enhancing User Experience with the Text function in Viewer application
Enhancing User Experience with the Text function in Viewer application
In this article, we will explore the use of the Text function in the Viewer application to enhance user experience and interactivity. Text is a powerful tool that can be used to provide information, instructions, or simply engage users with interactive content. Understanding the features of the Text function can help designers and developers create more engaging and user-friendly applications. Let's delve into the world of text and discover how it can elevate user experience.
Introduction to the Text function in Viewer application
The Text function in the Viewer application is a versatile tool that allows users to display text-based content within their designs. Whether it's providing context to an image, offering instructions on how to interact with an interface, or simply adding a touch of personality to a webpage, the Text function can be used in a variety of ways to enhance user experience. By incorporating text into your designs, you can effectively communicate with your audience and guide them through the user journey.
Text can be customized in terms of font style, size, color, alignment, and more, giving designers the flexibility to create visually appealing content that aligns with the overall branding and design aesthetic. Additionally, the Text function supports dynamic text updates, allowing for real-time changes to be reflected in the Viewer application. This dynamic feature enables users to receive up-to-date information and ensures a seamless user experience.
currencyIcon
This function converts the CurrencyIsoCode to the corresponding currency symbol. return blank if not found / not valid
{{currencyIcon Opportunity.CurrencyIsoCode}}
<!-- results when USD: $ -->
<!-- results when GBP: £ -->
{{currencyIcon 'USD'}}
<!-- results when USD: $ -->
Uppercase
Uppercase all of the characters in the given string. If used as a block helper it will uppercase the entire block. This helper does not support inverse blocks.
{{uppercase "aBcDeF"}}
<!-- results in: 'ABCDEF' -->
Lowercase
Lowercase all of the characters in the given string. If used as a block helper it will uppercase the entire block. This helper does not support inverse blocks.
{{lowercase "Foo BAR baZ"}}
<!-- results in: 'foo bar baz' -->
Truncate
Truncate a string to the specified length
.
truncate("foo bar baz", 7);
<!-- results in: 'foo bar' -->
truncate(sanitize("<span>foo bar baz</span>", 7));
<!-- results in: 'foo bar' -->
Trim
Removes extraneous whitespace from the beginning and end of a string.
{{trim " ABC "}}
<!-- results in: 'ABC' -->
Chop
Like trim, but removes both extraneous whitespace and non-word characters from the beginning and end of a string.
{{chop "_ABC_"}}
<!-- results in: 'ABC' -->
{{chop "-ABC-"}}
<!-- results in: 'ABC' -->
{{chop " ABC "}}
<!-- results in: 'ABC' -->
addCommas
Add commas to numbers
You can combine this function with others by wrapping the internal function in parentheses.
{{addCommas 1000 }}
<!-- results in: 1,000 -->
{{addCommas 987654321 }}
<!-- results in: 987,654,321 -->
{{addCommas "word - 4321" }}
<!-- results in: word - 4,321 -->
{{addCommas (toInt 9876543.21) }}
<!-- results in: 9,876,543 -->
startsWith
Checks if a string starts with a specific substring.
{{#startsWith '001' myRecord.Id}}
This record is an Account.
{{else}}
This record is not an Account.
{{/startsWith}}