RichText.ReadText
-----------------

Read rich text from text.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [RichText](component_RichText.md) | [4.4](newinversion44.md) | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ✅ Yes |

MBS( "RichText.ReadText"; Text { ; Encoding } ) 

**MBS**( **"RichText.ReadText";** /\* Read rich text from text. \*/  
**$Text**; /\* The text for the text file.e.g. "Hello World" \*/   
**$Encoding**) /\* Optional; The text encoding for text parameter.   
Default is native.e.g. UTF8 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Text | The text for the text file. | "Hello World" |  |
| Encoding | The text encoding for text parameter.    Default is native.   Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. More listed in the [FAQ](https://www.monkeybreadsoftware.com/filemaker/faq.shtml). | UTF8 | Optional |

### Result

Returns OK or error.

### Description

Read rich text from text.  
This is for reading RTF text. Be sure to have right text encoding to preserve special characters.  
  
To read styled text into [RichText](component_RichText.md) functions, please use [RichText.SetFormattedText](RichTextSetFormattedText.md).  
### See also

- [RichText.AppendText](RichTextAppendText.md)
- [RichText.HTMLText](RichTextHTMLText.md)
- [RichText.ReadFile](RichTextReadFile.md)
- [RichText.ReadHTML](RichTextReadHTML.md)
- [RichText.ReadRTF](RichTextReadRTF.md)
- [RichText.ReadURL](RichTextReadURL.md)
- [RichText.ReplaceText](RichTextReplaceText.md)
- [RichText.ReplaceTexts](RichTextReplaceTexts.md)
- [RichText.SetFormattedText](RichTextSetFormattedText.md)
- [RichText.SetText](RichTextSetText.md)

### Example Databases

- [Mac only/RichText/RTF to formatted text](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20only/RichText/RTF%20to%20formatted%20text.shtml#1ScriptAnchor_)

### Blog Entries

- [MBS Filemaker Plugin, version 4.4pr7](https://www.mbsplugins.de/archive/2014-10-27/MBS_Filemaker_Plugin_version_4/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 24th October 2014 , last changed 4th January 2017

  
[RichText.ReadRTF](RichTextReadRTF.md) - [RichText.ReadURL](RichTextReadURL.md)

[HTML Version](RichTextReadText.shtml)