WebView.CopyFormattedText
-------------------------

Copies formatted text from web view to clipboard.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [WebView](component_WebView.md) | [3.1](newinversion31.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ✅ Yes |

MBS( "WebView.CopyFormattedText"; WebViewerRef ) 

**MBS**( **"WebView.CopyFormattedText";** /\* Copies formatted text from web view to clipboard. \*/  
**$WebViewerRef**) /\* Either the Web Viewer Object Name or the Web Viewer ID as returned by "[WebView.FindByName](WebViewFindByName.md)" function. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| WebViewerRef | Either the Web Viewer Object Name or the Web Viewer ID as returned by "[WebView.FindByName](WebViewFindByName.md)" function. |  |

### Result

Returns OK or error.

### Description

Copies formatted text from web view to clipboard.  
You can insert it with the insert script step.  
Works well in FileMaker 12. In FileMaker 11 there are bugs so FileMaker doesn't import styles right from clipboard.  
  
Works for WebKit 2.x with plugin version 9.0.  
On windows, we do select all, copy and unselect to get all text to clipboard.  
### See also

- [WebView.FindByName](WebViewFindByName.md)
- [WebView.GetFormattedText](WebViewGetFormattedText.md)

### Release notes

- **Version 11.3**
    - Fixed [WebView.CopyFormattedText](https://www.mbsplugins.eu/WebViewCopyFormattedText.shtml) for Windows to return OK on success.
- **Version 8.2**
    - Implemented [WebView.GetFormattedText](http://www.mbsplugins.eu/WebViewGetFormattedText.shtml), [WebView.CopyFormattedText](http://www.mbsplugins.eu/WebViewCopyFormattedText.shtml) and [RichText.ReadWebviewer](http://www.mbsplugins.eu/RichTextReadWebviewer.shtml) for iOS and FileMaker 16.

### Blog Entries

- [MBS FileMaker Plugin, version 11.3pr6](https://www.mbsplugins.de/archive/2021-07-06/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 8.2pr7](https://www.mbsplugins.de/archive/2018-05-14/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 3.2pr2](https://www.mbsplugins.de/archive/2013-02-25/MBS_Filemaker_Plugin_version_3/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 3th July 2020

  
[WebView.Copy](WebViewCopy.md) - [WebView.Create](WebViewCreate.md)

[HTML Version](WebViewCopyFormattedText.shtml)