Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
Text.TextToHTML
Creates HTML text for a given FileMaker formatted styled text.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| Text | 4.3 | Yes | Yes | Yes | Yes | Yes |
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| Text | Formatted text to convert. | "Hello World" | |
| Options | Available in MBS FileMaker Plugin 6.5 or newer. The options number for html creation. Add 1 for having no body around. Add 2 to have no font names. Add 4 to have no font sizes. Add 8 to use strong instead of b tag for bold. Add 16 to keep links in HTML to pass through <a..></a> tags. (new in 7.4). |
1+2+4+8 | Optional |
Result
Returns OK or error.
Description
Creates HTML text for a given FileMaker formatted styled text.Supports styles like bold, italic, underline, font size and text color. Other style features may be added in the future on demand.
See also Text.EncodeToHTML and GetAsCSS in FileMaker.
Examples
Convert some text to HTML
MBS( "Text.TextToHTML"; "Hello World" )
Example result:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
</head>
<body>
<p>Hello World</p></body>
</html>
Convert some text to RTF
MBS( "Text.TextToRTF"; "Hello World" )
Example result:
{\rtf1\ansi\ansicpg1252
Hello World
}
Convert without body/header:
MBS( "Text.TextToHTML"; "Hello World”; 1 )
Example result: <p>Hello World</p>
See also
Example Databases
Blog Entries
- Email Script for FileMaker
- MBS FileMaker Plugin, version 7.4pr3
- MBS FileMaker Plugin, version 6.5pr7
- MBS FileMaker Plugin, version 5.4pr4
- MBS FileMaker Plugin, version 5.0pr10
- Sending Email with FileMaker via MBS Plugin
- MBS Filemaker Plugin, version 4.3pr10
FileMaker Magazin
Release notes
- Version 7.4
- Added option in Text.TextToHTML to keep links in html.
Created 7th September 2014, last changed 12nd February 2020
Feedback: Report problem or ask question.
Links
MBS Xojo PDF Plugins