Brian Dunning's FileMaker Custom Functions

GetTextStyle ( text )

Get text formatting assigned to a field or text

  Average rating: 4.3 (28 votes) Log in to vote

Marco Terrile   Marco Terrile
ChefMaTe
http://www.chefmate.it

Share on Facebook Share on Twitter

  Sample input:
GetTextStyle ("a text formatted as Verdana 14 bold, italic, underline and red")
  Sample output:
Verdana
14
bold+italic+underline
14483456

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Sintax: GetTextStyle ( text )

Parameter: "text" = any text expression or text field formatted with colors and styles other than default formatting of the field.

Result:
Font, Size, Style and RGB Color (only first style encountered by funcrion GetAsCSS) as "¶" separated list. Style is returned as "bold+italic+underline"... ecc. Color is returned as RGB number. If no formatting is applied the corresponding value is empty.
Warning, are returned only formatting other than the default ones of the field.

Example:
Let's say you have a field formatted as Arial 12 plain, black. If IN BROWSE MODE you change text formatting in - Verdana 14 bold, italic, underline, red - the CF returns:

Verdana
14
bold+italic+underline
14483456

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.