Clipboard.SetHTMLText
---------------------

Puts HTML data on the clipboard.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Clipboard](component_Clipboard.md) | [6.0](newinversion60.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ✅ Yes |

MBS( "Clipboard.SetHTMLText"; HTMLText { ; Encoding } ) 

**MBS**( **"Clipboard.SetHTMLText";** /\* Puts HTML data on the clipboard. \*/  
**$HTMLText**; /\* The html data to put in clipboard.e.g.   
"&lt;p&gt;Hello&lt;/p&gt;"  
\\f0\\b\\fs28 \\cf0 Hello World}" \*/   
**$Encoding**) /\* Optional; The text encoding for text parameter.   
Default is Windows ANSI.e.g. UTF8 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| HTMLText | The html data to put in clipboard. | "&lt;p&gt;Hello&lt;/p&gt;"   \\f0\\b\\fs28 \\cf0 Hello World}" |  |
| Encoding | The text encoding for text parameter.    Default is Windows ANSI.   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

Puts HTML data on the clipboard.  
For server this will modify the clipboard of the user account running the server app on the server computer and not the clipboard of any client.  
  
On Windows you may want to use [Text.ReplaceNewLine](TextReplaceNewLine.md) first to convert line endings. FileMaker on Windows uses Mac line endings internally.  
### Examples

Put some HTML on clipboard:

 MBS ( "Clipboard.SetHTMLText"; "&lt;b&gt;Hello&lt;/b&gt;"; "UTF8")  
### See also

- [Clipboard.GetHTMLText](ClipboardGetHTMLText.md)
- [Clipboard.GetRTFText](ClipboardGetRTFText.md)
- [Clipboard.GetText](ClipboardGetText.md)
- [Clipboard.SetRTFText](ClipboardSetRTFText.md)
- [Clipboard.SetStyledText](ClipboardSetStyledText.md)
- [Clipboard.SetText](ClipboardSetText.md)
- [Text.ReplaceNewLine](TextReplaceNewLine.md)

### Example Databases

- [Clipboard](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Clipboard.shtml#1Button25.0000000824.000000050.0000000937.0000000LayoutObjectAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 6.0pr6](https://www.mbsplugins.de/archive/2016-01-13/MBS_FileMaker_Plugin_version_6/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 7th January 2016 , last changed 26th December 2019

  
[Clipboard.SetFiles](ClipboardSetFiles.md) - [Clipboard.SetPDF](ClipboardSetPDF.md)

[HTML Version](ClipboardSetHTMLText.shtml)