Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4    Statistic  

Text.TextToHTML

Creates HTML text for a given FileMaker formatted styled text.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Text 4.3 Yes Yes Yes Yes Yes

MBS( "Text.TextToHTML"; Text { ; Options } )

Parameters

Parameter Description Example value
Text Formatted text to convert. "Hello World"
Options Optional
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 (new in 7.4).

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.

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


Text.Speak.AvailableVoices   -   Text.TextToRTF

Feedback: Report problem or ask question.




Links
MBS Xojo PDF Plugins