Software Venture Consulting
ToMarket

FileMaker Pro downloads & Resources
FileMaker Custom Functions
FileMaker Web Viewer Examples
FileMaker Pro & Lasso Consulting
Training
FileMaker Books
FileMaker Articles
FileMaker Error Reference

Free Web Tools
Free FileMaker Tools

Personal Pages
Videos
Adventures
Links

Shopping Cart
Shopping Cart

Search:

Free Newsletter
Signup


Contact


Privacy Policy



FileMaker is a registered trademark of FileMaker, Inc. in the U.S. and other countries.

 FileMaker Pro Custom Functions

List  |  Show Random  |  Upload  |  Add This to Your Site

HTMLtoText ( text ; returns )

Rate this function:  

RatingRatingRatingRatingRating
  Average rating: 3.1  (25 votes)
  Discuss this Custom Function

Mogens Brun, FM Integrator
http://filemakerintegrator.dk

Convert HTML text to text preserving bold and italic styles (v. 1.04).

Sample Input:
HTMLtoText ( "</h2>
<h2>Product Description:</h2>
Over 50 Conversions Very Quick<br /> Copy With click of 1 button<h2>What's new in this version:</h2>" ; "single" )
Sample Output:
<h2>Product Description:</h2>Over 50 Conversions Very Quick
Copy With click of 1 button<h2>What's new in this version:</h2>


 Then copy & paste into FileMaker Advanced's Edit Custom Function window.

Click here to copy To Clip Manager if you have myFMbutler's Clip Manager installed

Description:

Together with two subordinate custom functions "HTMLtoText_deleteTags" and "HTMLtoText_convertStyle" (also found on this site) this function will parseHTML text to plain text with preservation of any italic or bold markup in the HTML text. Several pages of text may be converted with reasonable text formating. The HTML text could be imported in a field by Troi URL plug-in, Fusion TCPdirect plug-in or by FileMaker GetLayoutObjectAttribute ( "WebViewerName" ; "content" ).

The second parameter (returns) controls if no empty lines should be allowed ( returns = "single") or one empty line may be allowed between paragraphs (returns = "double") with "double" as default.

Note: Requires FileMaker 10 or higher - unless 3 special char-values are stored in global fields.

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

This is my Custom Function and I want to edit it

Discuss:

There is an error in this function; it can't be pasted into Custom Functions without a FM error message about bad punctuation or a missing text constant or field name.

Dennis Burnham, Dallas, TX
August 10, 2010 8:04pm

I did not escape the "&" char with "&amp;" when I pasted the function to this site, so therefor there were several errors in the substitute section. This has now been corrected.

Mogens Brun, Gentofte, Denmark
August 11, 2010 2:06pm

Is there a comparable function that will translate text to HTML?

Dennis Burnham, Dallas, TX
August 05, 2011 6:58am

Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:

Your Name:
City/Location:
Comment:
characters left. If you paste in more than 1500 characters, it will be truncated. Discuss the function - advertisements and other useless posts will be deleted.
Answer 3 + 8 =
Search for Custom Functions:

Custom Functions Widget
Download the Custom Function Dashboard Widget for OS X
Keep all the latest Custom Functions right at your fingertips!

Newest Custom Functions:

1. phpArrayValue ( array ; key ; pos )
  (Fri, Jan 27, 1:49pm)
2. solfm_timeToMinutes (theTime;roundSec)
  (Fri, Jan 20, 6:26am)
3. filterLines(filterField;filterValue;Result)
  (Sat, Jan 14, 2:20pm)
4. getMaxValue ( theList )
  (Thu, Jan 12, 1:06pm)
5. MiddleWordsIncPunct ( text ; startingWord ; numberOfWords )
  (Sat, Jan 07, 9:16am)
6. WindowInfo
  (Fri, Jan 06, 12:39pm)
7. CenterWindow in Window vert horiz (demension)
  (Fri, Jan 06, 12:25pm)
8. UTF8_to_TXT ( Text , Platform )
  (Wed, Dec 28, 10:44pm)

RSS Feed of Custom Functions