Brian Dunning's FileMaker Custom Functions

TextToCSS ( text )

Returns a valid CSS, including all alignments, styles and colors of the original text.

  Average rating: 4.2 (36 votes) Log in to vote

Daniele Raybaudi   Daniele Raybaudi - Show more from this author
ACI
http://www.aci.it

Share on Facebook Share on Twitter

  Sample input:
TextToCSS ( "some text" )
  Sample output:
some text

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

Returns a valid CSS, including all alignments, styles and colors of the original text. ( GetAsCSS ( ) can't do it !! )

A Web Viewer set as:

"data: text / html, " & TextToCSS ( YourTable::text )

shows exactly the content of the field.

You could try the example file at: http://fmforums.com/forum/index.php?app=core&module=attach§ion=attach&attach_id=20326

 

Comments

MB   MB, Madrid
Oct 27, 2016
This is a great concept, but the first alignment tag is applied to all the text. So if I have a titled centered followed by a left justified paragraph, when I apply this function both the title and the paragraph appear centered.
 

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.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: