FoxitPDFSDKforWeb v10.0.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...

Inheritance diagram for TextSelectionTool:
Disposable

Public Member Functions

 copy ()
 Copy the current selected text into system clipboard. More...
 
 getSelectionInfo ()
 Obtains the current text selection information. More...
 
- Public Member Functions inherited from Disposable
 addDestroyHook (...hooks)
 
 destroy ()
 

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:number, top:number, right:number, bottom:number, text:number}> }> - // Boundaries of each line of selected text

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