Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old


Queries the current text of the document.

Component Version macOS Windows Linux Server iOS SDK
WebView 5.0 ✅ Yes ❌ No ❌ No ❌ No ✅ Yes
MBS( "WebView.GetFormattedText"; WebViewerRef )   More


Parameter Description Example
WebViewerRef Either the Web Viewer Object Name or the Web Viewer ID as returned by "WebView.FindByName" function.


Returns text or error.


Queries the current text of the document.
If possible with formatting, but only the text. This may show more/less text than you see.

See also WebView.GetPlainText, WebView.GetHTMLText and WebView.
Alternative you can run JavaScript to query document.body.parentElement.outerHTML yourself and convert HTML to styled text.


Query plain text from WebViewer:

MBS("WebView.GetPlainText"; "web")

Query html text from WebViewer:

MBS("WebView.GetHTMLText"; "web")

Query formatted text from WebViewer:

MBS("WebView.GetFormattedText"; "web")

Query selected text:

MBS("WebView.SelectedText"; "web")

See also

Release notes

Example Databases

Blog Entries

This function checks for a license.

Created 12nd February 2015, last changed 4th November 2021

WebView.GetFormValue - WebView.GetHTMLText