Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3    Statistic  

Webview.SelectedText

Queries text of current selection.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Webview 5.0 Yes Yes No No Yes

MBS( "Webview.SelectedText"; WebViewerRef { ; Formatted } )

Parameters

Parameter Description Example value
WebViewerRef Either the Web Viewer Object Name or the Web Viewer ID as returned by "WebView.FindByName" function.
Formatted Optional
Optional for Mac. If 1, tries to get text with formatting.
1

Result

Returns text or error.

Description

Queries text of current selection.
If you put this in a button, the focus may leave WebViewer and selection is lost. In a menu it works better.

See also WebView.GetPlainText, WebView.GetHTMLText and WebView.GetFormattedText.

Examples

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

Example Databases


Webview.Scrollbar.set   -   Webview.SendCommand

Feedback: Report problem or ask question.




Links
MBS Xojo tutorial videos