Links can only be inserted into the main layer; other layers are not supported. This API supports undo/redo in notes.
| Parameter | Type | Description |
|---|---|---|
textLink.destPath | string | Destination path / URL: when linkType === 4, set this to the URL; otherwise set it to the destination file path |
textLink.destPage | number | Destination page (only valid when linkType === 0 or linkType === 2)For linkType === 0: must be a non-negative integer, meaning the target note pageFor linkType === 2: a negative value jumps to the document current page; a non-negative integer jumps to the specified document page |
textLink.style | number | Link style: 0 solid underline, 1 solid border, 2 dashed border |
textLink.linkType | number | Link type: 0 note page, 1 note file, 2 document, 3 image, 4 URL |
textLink.rect | Rect | Text region rectangle (must be non-zero area) |
textLink.fontSize | number | Font size (positive number) |
textLink.fullText | string | Full text (required for text links) |
textLink.showText | string | Display text (required for text links) |
textLink.isItalic | number | Italic: 0 no, 1 yes |
Returns
APIResponse<number>:resultis a status code (convention:0success,-1failure,-2target file requires upgrade)