FoxitPDFSDKforWeb  8.4.0
Foxit PDF SDK for Web
TextSelectionTool Class Reference

This class is used in text selection tools in <tooltip-layer>. For more details on usage please refer to this example: -examples{UIExtension/customize-text-selection-tool/index.html}. More...

Inherits Disposable.

Public Member Functions

 copy ()
 Copy the current selected text into system clipboard. More...
 
 getSelectionInfo ()
 Obtains the current text selection information. More...
 

Detailed Description

This class is used in text selection tools in <tooltip-layer>. For more details on usage please refer to this example: -examples{UIExtension/customize-text-selection-tool/index.html}.

Since
7.2

Member Function Documentation

◆ copy()

TextSelectionTool::copy ( )
inline

Copy the current selected text into system clipboard.

Returns
Promise<void>

◆ getSelectionInfo()

TextSelectionTool::getSelectionInfo ( )
inline

Obtains the current text selection information.

Returns
Promise<{
text: string, // selected text
page: PDFPage, // The page where the selected text is located
rectArray: Array<{left, top, right, bottom, text}> // Boundaries of each line of selected text
}>

Foxit Software Corporation Logo
@2022 Foxit Software Incorporated. All rights reserved.