RichText.ReadURL
----------------

Reads a text file from an URL.

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

MBS( "RichText.ReadURL"; URL ) 

**MBS**( **"RichText.ReadURL";** /\* Reads a text file from an URL. \*/  
**$URL**) /\* The URL to the text file. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| URL | The URL to the text file. | $URL |

### Result

Returns OK or error message.

### Description

Reads a text file from an URL.  
The plugin uses Mac [system](component_System.md) functions to read text files including plain text files, RTF files, Word files in doc or xml format, webkit archives or OpenOffice documents.  
  
Warning: The plugin can only read/write the styles/formats which Apple supports for their cocoa framework.  
### Examples

Read formatted text from container field:

 $r = MBS ( "RichText.ReadURL"; "file:///Users/Desktop/test.txt" )  
$text = MBS ( "[RichText.FormattedText](RichTextFormattedText.md)" )  
### See also

- [RichText.FormattedText](RichTextFormattedText.md)
- [RichText.ReadFile](RichTextReadFile.md)
- [RichText.ReadHTML](RichTextReadHTML.md)
- [RichText.ReadRTF](RichTextReadRTF.md)
- [RichText.ReadText](RichTextReadText.md)

### Example Databases

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

This function checks for a license.

Created 18th August 2014 , last changed 14th August 2017

  
[RichText.ReadText](RichTextReadText.md) - [RichText.ReadWebviewer](RichTextReadWebviewer.md)

[HTML Version](RichTextReadURL.shtml)