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 page For linkType === 2: a negative value jumps to the document current page; a non-negative integer jumps to the specified document page
Supported linkType ranges may differ across APIs. Currently, insertTextLink only allows 0..4.
When reading lasso link data, you may encounter linkType=6 (digest link). This type is currently read-only and cannot be created via this API. See Link / LassoLink.
Returns
APIResponse<number>:
result is a status code (convention: 0 success, -1 failure, -2 target file requires upgrade)
Example
import { PluginNoteAPI, type Rect } from 'sn-plugin-lib';/** * Example: insert a text link into the current note page. */export async function exampleInsertTextLink() { const rect: Rect = { left: 100, top: 100, right: 300, bottom: 160 }; const res = await PluginNoteAPI.insertTextLink({ destPath: '/storage/emulated/0/Note/demo.note', destPage: 1, style: 0, linkType: 0, rect, fontSize: 32, fullText: 'Full Text', showText: 'Show Text', isItalic: 0, }); if (!res.success) { throw new Error(res.error?.message ?? 'insertTextLink call failed'); } return res.result;}
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Supernote","colors":{"primary":"#368BC1","light":"#5AA3D1","dark":"#2A6E99"},"logo":{"light":"https://mintcdn.com/rattashanghai/ae3Z9gbDK5_mDDm9/logo/light.svg?fit=max\u0026auto=format\u0026n=ae3Z9gbDK5_mDDm9\u0026q=85\u0026s=f26a99d3aa54c94983e1a62bbb9b3cb8","dark":"https://mintcdn.com/rattashanghai/ae3Z9gbDK5_mDDm9/logo/dark.svg?fit=max\u0026auto=format\u0026n=ae3Z9gbDK5_mDDm9\u0026q=85\u0026s=cdc5ef0678e80e6d8d7e13bea87f3ef4"},"favicon":"https://mintcdn.com/rattashanghai/Xc-fTcb6M7VWTYp5/favicon.svg?fit=max\u0026auto=format\u0026n=Xc-fTcb6M7VWTYp5\u0026q=85\u0026s=565f3c5669675de08642935e861d8af4","background":{"color":{"light":"#EFEFEF","dark":"#1B1B1B"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"href":"en"},{"language":"zh","href":"zh"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"rattashanghai","hasAudioNarration":false,"actualSubdomain":"rattashanghai","customDomains":["docs.supernote.com"],"gitSource":{"type":"github","owner":"supernote-ratta","repo":"docs-plugin","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6acc4b220861624c50959b89","clientVersion":"0.0.4160","searchFilterCounts":[{"language":"en","tag":"API reference","count":140},{"language":"en","tag":"Supernote Plugin SDK","count":140},{"language":"zh","tag":"API reference","count":140},{"language":"zh","tag":"Supernote Plugin SDK","count":140},{"language":"en","tag":"PluginFileAPI","count":38},{"language":"zh","tag":"PluginFileAPI","count":38},{"language":"en","tag":"PluginCommAPI","count":37},{"language":"zh","tag":"PluginCommAPI","count":37},{"language":"en","tag":"Types","count":25},{"language":"zh","tag":"类型","count":25},{"language":"en","tag":"PluginManager","count":18},{"language":"zh","tag":"PluginManager","count":18},{"language":"en","tag":"PluginNoteAPI","count":14},{"language":"en","tag":"Guides","count":14},{"language":"zh","tag":"PluginNoteAPI","count":14},{"language":"zh","tag":"Guides","count":14},{"language":"en","tag":"Developer Guide","count":12},{"language":"zh","tag":"开发指南","count":12},{"language":"en","tag":"Basics","count":10},{"language":"zh","tag":"学习基础知识","count":10}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"#footer,footer{display:none!important}"}],"page":{"pagePath":"en/api-reference/supernote-plugin/plugin-note-api/insert-text-link","slug":"/en/api-reference/supernote-plugin/plugin-note-api/insert-text-link","pageMetadata":{"title":"insertTextLink","description":"Insert a text link into the main layer of the currently opened note page.","href":"/en/api-reference/supernote-plugin/plugin-note-api/insert-text-link"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Insert a text link into the main layer of the currently opened note page.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Note,{children:_jsx(_components.p,{children:`Links can only be inserted into the main layer; other layers are not supported. This API supports undo/redo in notes.`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`static`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` insertTextLink`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`textLink`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` destPath:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` destPage`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` style`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` linkType`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` rect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Rect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` fontSize`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` fullText`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` showText`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` isItalic`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}): `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`Promise`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`APIResponse`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`number`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Parameters`})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`textLink.destPath`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsxs(_components.td,{children:[`Destination path / URL: when `,_jsx(_components.code,{children:`linkType === 4`}),`, set this to the URL; otherwise set it to the destination file path`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`textLink.destPage`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`number`})}),_jsxs(_components.td,{children:[`Destination page (only valid when `,_jsx(_components.code,{children:`linkType === 0`}),` or `,_jsx(_components.code,{children:`linkType === 2`}),`)`,_jsx(`br`,{}),`For `,_jsx(_components.code,{children:`linkType === 0`}),`: must be a non-negative integer, meaning the target note page`,_jsx(`br`,{}),`For `,_jsx(_components.code,{children:`linkType === 2`}),`: a negative value jumps to the document current page; a non-negative integer jumps to the specified document page`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`textLink.style`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`number`})}),_jsxs(_components.td,{children:[`Link style: `,_jsx(_components.code,{children:`0`}),` solid underline, `,_jsx(_components.code,{children:`1`}),` solid border, `,_jsx(_components.code,{children:`2`}),` dashed border`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`textLink.linkType`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`number`})}),_jsxs(_components.td,{children:[`Link type: `,_jsx(_components.code,{children:`0`}),` note page, `,_jsx(_components.code,{children:`1`}),` note file, `,_jsx(_components.code,{children:`2`}),` document, `,_jsx(_components.code,{children:`3`}),` image, `,_jsx(_components.code,{children:`4`}),` URL`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`textLink.rect`})}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/en/api-reference/supernote-plugin/types/rect`,children:_jsx(_components.code,{children:`Rect`})})}),_jsx(_components.td,{children:`Text region rectangle (must be non-zero area)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`textLink.fontSize`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`number`})}),_jsx(_components.td,{children:`Font size (positive number)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`textLink.fullText`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`Full text (required for text links)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`textLink.showText`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`Display text (required for text links)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`textLink.isItalic`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`number`})}),_jsxs(_components.td,{children:[`Italic: `,_jsx(_components.code,{children:`0`}),` no, `,_jsx(_components.code,{children:`1`}),` yes`]})]})]})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Supported `,_jsx(_components.code,{children:`linkType`}),` ranges may differ across APIs. Currently, `,_jsx(_components.code,{children:`insertTextLink`}),` only allows `,_jsx(_components.code,{children:`0..4`}),`.\nWhen reading lasso link data, you may encounter `,_jsx(_components.code,{children:`linkType=6`}),` (digest link). This type is currently read-only and cannot be created via this API. See `,_jsx(_components.a,{href:`/en/api-reference/supernote-plugin/types/link`,children:_jsx(_components.code,{children:`Link`})}),` / `,_jsx(_components.a,{href:`/en/api-reference/supernote-plugin/types/lasso-link`,children:_jsx(_components.code,{children:`LassoLink`})}),`.`]})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Returns`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/en/api-reference/supernote-plugin/types/api-response`,children:_jsx(_components.code,{children:`APIResponse\u003cnumber>`})}),`:\n`,_jsx(_components.code,{children:`result`}),` is a status code (convention: `,_jsx(_components.code,{children:`0`}),` success, `,_jsx(_components.code,{children:`-1`}),` failure, `,_jsx(_components.code,{children:`-2`}),` target file requires upgrade)`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`example`,children:`Example`}),`\n`,_jsx(CodeBlock,{filename:``,wrap:`true`,numberOfLines:`24`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`24`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`PluginNoteAPI`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Rect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'sn-plugin-lib'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`/**`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` * Example: insert a text link into the current note page.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` */`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` exampleInsertTextLink`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` rect`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Rect`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`left:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 100`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`top:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 100`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`right:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 300`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bottom:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 160`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` };`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` res`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` PluginNoteAPI`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`insertTextLink`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` destPath:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '/storage/emulated/0/Note/demo.note'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` destPage:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` style:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` linkType:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` rect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` fontSize:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 32`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` fullText:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Full Text'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` showText:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Show Text'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` isItalic:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`success`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`message`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ??`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'insertTextLink call failed'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"insertTextLink","description":"Insert a text link into the main layer of the currently opened note page.","href":"/en/api-reference/supernote-plugin/plugin-note-api/insert-text-link"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Example","slug":"example","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"rattashanghai","siteName":"Supernote","title":"insertTextLink - Supernote","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/en/api-reference/supernote-plugin/plugin-note-api/insert-text-link","matchLevel":0},"zh":{"href":"/zh/api-reference/supernote-plugin/plugin-note-api/insert-text-link","matchLevel":1}}},"lastModified":"2026-03-23T07:46:21.530Z","originalFileLocation":"en/api-reference/supernote-plugin/plugin-note-api/insert-text-link.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Insert a text link into the main layer of the currently opened note page.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Supernote\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/rattashanghai/gKgsAmJcZIhsG6n2/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/rattashanghai/gKgsAmJcZIhsG6n2/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/rattashanghai/gKgsAmJcZIhsG6n2/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/rattashanghai/gKgsAmJcZIhsG6n2/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/rattashanghai/gKgsAmJcZIhsG6n2/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/rattashanghai/gKgsAmJcZIhsG6n2/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/rattashanghai/gKgsAmJcZIhsG6n2/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/rattashanghai/gKgsAmJcZIhsG6n2/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/rattashanghai/gKgsAmJcZIhsG6n2/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"insertTextLink - Supernote\">\u003cmeta data-mint-head property=\"og:description\" content=\"Insert a text link into the main layer of the currently opened note page.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Supernote\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.supernote.com/en/api-reference/supernote-plugin/plugin-note-api/insert-text-link\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://rattashanghai.mintlify.site/_mintlify/api/og/v2?division=PluginNoteAPI\u0026amp;title=insertTextLink\u0026amp;description=Insert+a+text+link+into+the+main+layer+of+the+currently+opened+note+page.\u0026amp;theme=882e7c131147973e3b540895\u0026amp;signature=d51f26513fc06bb91526d84e20643ffc711332b34e342be0fd99b59ee30708ab\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"insertTextLink - Supernote\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Insert a text link into the main layer of the currently opened note page.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://rattashanghai.mintlify.site/_mintlify/api/og/v2?division=PluginNoteAPI\u0026amp;title=insertTextLink\u0026amp;description=Insert+a+text+link+into+the+main+layer+of+the+currently+opened+note+page.\u0026amp;theme=882e7c131147973e3b540895\u0026amp;signature=d51f26513fc06bb91526d84e20643ffc711332b34e342be0fd99b59ee30708ab\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/rattashanghai/gKgsAmJcZIhsG6n2/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Supernote\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#368BC1\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.supernote.com/en/api-reference/supernote-plugin/plugin-note-api/insert-text-link\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/en/api-reference/supernote-plugin/plugin-note-api/insert-text-link.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.supernote.com/en/api-reference/supernote-plugin/plugin-note-api/insert-text-link\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://docs.supernote.com/zh/api-reference/supernote-plugin/plugin-note-api/insert-text-link\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.supernote.com/en/api-reference/supernote-plugin/plugin-note-api/insert-text-link\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.supernote.com/#organization\",\"name\":\"Supernote\",\"url\":\"https://docs.supernote.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/rattashanghai/ae3Z9gbDK5_mDDm9/logo/light.svg?fit=max\u0026auto=format\u0026n=ae3Z9gbDK5_mDDm9\u0026q=85\u0026s=f26a99d3aa54c94983e1a62bbb9b3cb8\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.supernote.com#website\",\"name\":\"Supernote\",\"url\":\"https://docs.supernote.com\",\"publisher\":{\"@id\":\"https://docs.supernote.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.supernote.com/en/api-reference/supernote-plugin/plugin-note-api/insert-text-link#webpage\",\"url\":\"https://docs.supernote.com/en/api-reference/supernote-plugin/plugin-note-api/insert-text-link\",\"name\":\"insertTextLink\",\"description\":\"Insert a text link into the main layer of the currently opened note page.\",\"dateModified\":\"2026-03-23T07:46:21.530Z\",\"isPartOf\":{\"@id\":\"https://docs.supernote.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.supernote.com/en/api-reference/supernote-plugin/plugin-note-api/insert-text-link#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.supernote.com/en/api-reference/supernote-plugin/plugin-note-api/insert-text-link#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Supernote Plugin SDK\",\"item\":\"https://docs.supernote.com/en/api-reference/supernote-plugin/plugin-comm-api\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PluginNoteAPI\",\"item\":\"https://docs.supernote.com/en/api-reference/supernote-plugin/plugin-note-api\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"insertTextLink\",\"item\":\"https://docs.supernote.com/en/api-reference/supernote-plugin/plugin-note-api/insert-text-link\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.supernote.com/en/api-reference/supernote-plugin/plugin-note-api/insert-text-link#article\",\"headline\":\"insertTextLink\",\"name\":\"insertTextLink\",\"description\":\"Insert a text link into the main layer of the currently opened note page.\",\"url\":\"https://docs.supernote.com/en/api-reference/supernote-plugin/plugin-note-api/insert-text-link\",\"mainEntityOfPage\":{\"@id\":\"https://docs.supernote.com/en/api-reference/supernote-plugin/plugin-note-api/insert-text-link#webpage\"},\"dateModified\":\"2026-03-23T07:46:21.530Z\",\"publisher\":{\"@id\":\"https://docs.supernote.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.supernote.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Supernote\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Supernote\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/en/api-reference/supernote-plugin/plugin-note-api/insert-text-link.md","siteName":"Supernote","nav":{"global":null,"languages":[{"language":"en","default":true,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":"/en"}]},{"tab":"API reference","groups":[{"group":"Supernote Plugin SDK","pages":[{"group":"PluginCommAPI","expanded":false,"pages":[{"title":"PluginCommAPI","sidebarTitle":"Overview","href":"/en/api-reference/supernote-plugin/plugin-comm-api"},{"title":"createElement","href":"/en/api-reference/supernote-plugin/plugin-comm-api/create-trail"},{"title":"recycleElement","href":"/en/api-reference/supernote-plugin/plugin-comm-api/recycle-trail"},{"title":"clearElementCache","href":"/en/api-reference/supernote-plugin/plugin-comm-api/clear-trail-cache"},{"title":"getCacheElement","href":"/en/api-reference/supernote-plugin/plugin-comm-api/get-cache-element"},{"title":"saveStickerByLasso","href":"/en/api-reference/supernote-plugin/plugin-comm-api/save-sticker-by-lasso"},{"title":"getStickerSize","href":"/en/api-reference/supernote-plugin/plugin-comm-api/get-sticker-size"},{"title":"generateStickerThumbnail","href":"/en/api-reference/supernote-plugin/plugin-comm-api/generate-sticker-thumbnail"},{"title":"convertElement2Sticker","href":"/en/api-reference/supernote-plugin/plugin-comm-api/convert-trail2-sticker"},{"title":"insertSticker","href":"/en/api-reference/supernote-plugin/plugin-comm-api/insert-sticker"},{"title":"setLassoBoxState","href":"/en/api-reference/supernote-plugin/plugin-comm-api/set-lasso-box-state"},{"title":"getLassoRect","href":"/en/api-reference/supernote-plugin/plugin-comm-api/get-lasso-rect"},{"title":"lassoElements","href":"/en/api-reference/supernote-plugin/plugin-comm-api/lasso-elements"},{"title":"resizeLassoRect","href":"/en/api-reference/supernote-plugin/plugin-comm-api/resize-lasso-rect"},{"title":"flipLassoElements","href":"/en/api-reference/supernote-plugin/plugin-comm-api/flip-lasso-elements"},{"title":"getLassoElements","href":"/en/api-reference/supernote-plugin/plugin-comm-api/get-lasso-data"},{"title":"getLassoElementTypeCounts","href":"/en/api-reference/supernote-plugin/plugin-comm-api/get-lasso-data-type-counts"},{"title":"deleteLassoElements","href":"/en/api-reference/supernote-plugin/plugin-comm-api/delete-lasso-data"},{"title":"getCurrentPageNum","href":"/en/api-reference/supernote-plugin/plugin-comm-api/get-current-page-num"},{"title":"canHandwrite","href":"/en/api-reference/supernote-plugin/plugin-comm-api/can-handwrite"},{"title":"jumpToPage","href":"/en/api-reference/supernote-plugin/plugin-comm-api/jump-to-page"},{"title":"getPageDisplaySize","href":"/en/api-reference/supernote-plugin/plugin-comm-api/get-page-display-size"},{"title":"modifyPageElements","href":"/en/api-reference/supernote-plugin/plugin-comm-api/modify-page-elements"},{"title":"insertPageElements","href":"/en/api-reference/supernote-plugin/plugin-comm-api/insert-page-elements"},{"title":"deletePageElements","href":"/en/api-reference/supernote-plugin/plugin-comm-api/delete-page-elements"},{"title":"batchUpdatePageElements","href":"/en/api-reference/supernote-plugin/plugin-comm-api/batch-update-page-elements"},{"title":"getCurrentFilePath","href":"/en/api-reference/supernote-plugin/plugin-comm-api/get-current-file-path"},{"title":"getPenInfo","href":"/en/api-reference/supernote-plugin/plugin-comm-api/get-pen-info"},{"title":"recognizeElements","href":"/en/api-reference/supernote-plugin/plugin-comm-api/recognize-elements"},{"title":"cancelRecognize","href":"/en/api-reference/supernote-plugin/plugin-comm-api/cancel-recognize"},{"title":"reloadFile","href":"/en/api-reference/supernote-plugin/plugin-comm-api/reload-file"},{"title":"getLassoGeometries","href":"/en/api-reference/supernote-plugin/plugin-comm-api/get-lasso-geometries"},{"title":"insertGeometry","href":"/en/api-reference/supernote-plugin/plugin-comm-api/insert-geometry"},{"title":"modifyLassoGeometry","href":"/en/api-reference/supernote-plugin/plugin-comm-api/modify-lasso-geometry"},{"title":"getNoteSystemTemplates","href":"/en/api-reference/supernote-plugin/plugin-comm-api/get-note-system-templates"},{"title":"insertFiveStar","href":"/en/api-reference/supernote-plugin/plugin-comm-api/insert-five-star"},{"title":"generateLassoPreview","href":"/en/api-reference/supernote-plugin/plugin-comm-api/generate-lasso-preview"}]},{"group":"PluginNoteAPI","expanded":false,"pages":[{"title":"PluginNoteAPI","sidebarTitle":"Overview","href":"/en/api-reference/supernote-plugin/plugin-note-api/index"},{"title":"getLassoLinks","href":"/en/api-reference/supernote-plugin/plugin-note-api/get-lasso-link"},{"title":"setLassoStrokeLink","description":"Set lasso-selected elements as a link.","href":"/en/api-reference/supernote-plugin/plugin-note-api/set-lasso-stroke-link"},{"title":"insertTextLink","href":"/en/api-reference/supernote-plugin/plugin-note-api/insert-text-link"},{"title":"modifyLassoLink","description":"Modify link data.","href":"/en/api-reference/supernote-plugin/plugin-note-api/modify-lasso-link"},{"title":"saveCurrentNote","href":"/en/api-reference/supernote-plugin/plugin-note-api/save-current-note"},{"title":"setLassoTitle","href":"/en/api-reference/supernote-plugin/plugin-note-api/set-lasso-title"},{"title":"getLassoTitles","href":"/en/api-reference/supernote-plugin/plugin-note-api/get-lasso-title"},{"title":"modifyLassoTitle","href":"/en/api-reference/supernote-plugin/plugin-note-api/modify-lasso-title"},{"title":"getLassoText","href":"/en/api-reference/supernote-plugin/plugin-note-api/get-lasso-text"},{"title":"insertText","href":"/en/api-reference/supernote-plugin/plugin-note-api/insert-text"},{"title":"modifyLassoText","href":"/en/api-reference/supernote-plugin/plugin-note-api/modify-lasso-text"},{"title":"insertImage","href":"/en/api-reference/supernote-plugin/plugin-note-api/insert-image"},{"title":"generateLayerPreviewImage","href":"/en/api-reference/supernote-plugin/plugin-note-api/generate-layer-preview-image"}]},{"group":"PluginDocAPI","expanded":false,"pages":[{"title":"PluginDocAPI","sidebarTitle":"Overview","href":"/en/api-reference/supernote-plugin/plugin-doc-api/index"},{"title":"getLastSelectedText","href":"/en/api-reference/supernote-plugin/plugin-doc-api/get-last-selected-text"},{"title":"getCurrentDocText","href":"/en/api-reference/supernote-plugin/plugin-doc-api/get-current-doc-text"},{"title":"getCurrentTotalPages","href":"/en/api-reference/supernote-plugin/plugin-doc-api/get-current-total-pages"},{"title":"generateCurrentDocImage","href":"/en/api-reference/supernote-plugin/plugin-doc-api/generate-current-doc-image"}]},{"group":"PluginFileAPI","expanded":false,"pages":[{"title":"PluginFileAPI","sidebarTitle":"Overview","href":"/en/api-reference/supernote-plugin/plugin-file-api/index"},{"title":"getElements","href":"/en/api-reference/supernote-plugin/plugin-file-api/get-page-trails"},{"title":"replaceElements","href":"/en/api-reference/supernote-plugin/plugin-file-api/replace-trails"},{"title":"insertElements","href":"/en/api-reference/supernote-plugin/plugin-file-api/insert-trails"},{"title":"modifyElements","href":"/en/api-reference/supernote-plugin/plugin-file-api/modify-trails"},{"title":"deleteElements","href":"/en/api-reference/supernote-plugin/plugin-file-api/delete-elements"},{"title":"getTitles","href":"/en/api-reference/supernote-plugin/plugin-file-api/get-titles"},{"title":"getKeyWords","href":"/en/api-reference/supernote-plugin/plugin-file-api/get-key-words"},{"title":"insertKeyWord","href":"/en/api-reference/supernote-plugin/plugin-file-api/insert-key-word"},{"title":"deleteKeyWord","href":"/en/api-reference/supernote-plugin/plugin-file-api/delete-key-word"},{"title":"getNoteTotalPageNum","href":"/en/api-reference/supernote-plugin/plugin-file-api/get-note-total-page-num"},{"title":"getPageSize","href":"/en/api-reference/supernote-plugin/plugin-file-api/get-page-size"},{"title":"generateNotePng","href":"/en/api-reference/supernote-plugin/plugin-file-api/generate-note-png"},{"title":"searchFiveStars","href":"/en/api-reference/supernote-plugin/plugin-file-api/search-five-stars"},{"title":"createNote","href":"/en/api-reference/supernote-plugin/plugin-file-api/create-note"},{"title":"removeNotePage","href":"/en/api-reference/supernote-plugin/plugin-file-api/remove-note-page"},{"title":"insertNotePage","href":"/en/api-reference/supernote-plugin/plugin-file-api/insert-note-page"},{"title":"clearLayerElements","href":"/en/api-reference/supernote-plugin/plugin-file-api/clear-page-layer-data"},{"title":"getLayers","href":"/en/api-reference/supernote-plugin/plugin-file-api/get-layers"},{"title":"modifyLayers","href":"/en/api-reference/supernote-plugin/plugin-file-api/modify-layers"},{"title":"insertLayer","href":"/en/api-reference/supernote-plugin/plugin-file-api/insert-layer"},{"title":"deleteLayers","href":"/en/api-reference/supernote-plugin/plugin-file-api/delete-layers"},{"title":"sortLayers","href":"/en/api-reference/supernote-plugin/plugin-file-api/sort-layers"},{"title":"getMarkPages","href":"/en/api-reference/supernote-plugin/plugin-file-api/get-mark-pages"},{"title":"generateMarkThumbnails","href":"/en/api-reference/supernote-plugin/plugin-file-api/generate-mark-thumbnails"},{"title":"clearMarkElements","href":"/en/api-reference/supernote-plugin/plugin-file-api/clear-mark-trails"},{"title":"getNotePageTemplate","href":"/en/api-reference/supernote-plugin/plugin-file-api/get-note-page-template"},{"title":"generateNoteTemplatePng","href":"/en/api-reference/supernote-plugin/plugin-file-api/generate-note-template-png"},{"title":"getNoteType","href":"/en/api-reference/supernote-plugin/plugin-file-api/get-note-type"},{"title":"getFileMachineType","href":"/en/api-reference/supernote-plugin/plugin-file-api/get-file-machine-type"},{"title":"getElementCounts","href":"/en/api-reference/supernote-plugin/plugin-file-api/get-element-counts"},{"title":"getElementNumList","href":"/en/api-reference/supernote-plugin/plugin-file-api/get-element-num-list"},{"title":"getElement","href":"/en/api-reference/supernote-plugin/plugin-file-api/get-element"},{"title":"getLastElement","href":"/en/api-reference/supernote-plugin/plugin-file-api/get-last-element"},{"title":"openFile","href":"/en/api-reference/supernote-plugin/plugin-file-api/open-file"},{"title":"getPathEncryptionStatus","href":"/en/api-reference/supernote-plugin/plugin-file-api/get-path-encryption-status"},{"title":"unlockPathWithPassword","href":"/en/api-reference/supernote-plugin/plugin-file-api/unlock-path-with-password"},{"title":"lockPathAccess","href":"/en/api-reference/supernote-plugin/plugin-file-api/lock-path-access"}]},{"group":"PluginManager","expanded":false,"pages":[{"title":"Overview","href":"/en/api-reference/supernote-plugin/plugin-manager/index"},{"title":"init","href":"/en/api-reference/supernote-plugin/plugin-manager/init"},{"title":"registerPluginLifeListener","href":"/en/api-reference/supernote-plugin/plugin-manager/register-plugin-life-listener"},{"title":"registerLangListener","href":"/en/api-reference/supernote-plugin/plugin-manager/register-lang-listener"},{"title":"registerEventListener","href":"/en/api-reference/supernote-plugin/plugin-manager/register-event-listener"},{"title":"registerMotionListener","href":"/en/api-reference/supernote-plugin/plugin-manager/register-motion-listener"},{"title":"Plugin Button Registration and Listener","href":"/en/api-reference/supernote-plugin/plugin-manager/register-button"},{"title":"unregisterButton","href":"/en/api-reference/supernote-plugin/plugin-manager/unregister-button"},{"title":"getButtonState","href":"/en/api-reference/supernote-plugin/plugin-manager/get-button-state"},{"title":"setButtonState","href":"/en/api-reference/supernote-plugin/plugin-manager/set-button-state"},{"title":"Config Button Registration and Listener","href":"/en/api-reference/supernote-plugin/plugin-manager/register-config-button"},{"title":"getPluginDirPath","href":"/en/api-reference/supernote-plugin/plugin-manager/get-plugin-dir-path"},{"title":"getPluginName","href":"/en/api-reference/supernote-plugin/plugin-manager/get-plugin-name"},{"title":"getDeviceType","href":"/en/api-reference/supernote-plugin/plugin-manager/get-device-type"},{"title":"closePluginView","href":"/en/api-reference/supernote-plugin/plugin-manager/close-plugin-view"},{"title":"hasPermission","href":"/en/api-reference/supernote-plugin/plugin-manager/has-permission"},{"title":"requestPermission","href":"/en/api-reference/supernote-plugin/plugin-manager/request-permission"},{"title":"showPluginView","href":"/en/api-reference/supernote-plugin/plugin-manager/show-plugin-view"}]},{"group":"Utils","expanded":false,"pages":[{"title":"PointUtils","href":"/en/api-reference/supernote-plugin/utils/point-utils/index"},{"title":"androidPoint2Emr","href":"/en/api-reference/supernote-plugin/utils/point-utils/android-point2-emr"},{"title":"emrPoint2Android","href":"/en/api-reference/supernote-plugin/utils/point-utils/emr-point2-android"}]},{"group":"Types","expanded":false,"pages":[{"title":"Overview","href":"/en/api-reference/supernote-plugin/types/index"},{"title":"APIResponse","href":"/en/api-reference/supernote-plugin/types/api-response"},{"title":"Point","href":"/en/api-reference/supernote-plugin/types/point"},{"title":"Rect","href":"/en/api-reference/supernote-plugin/types/rect"},{"title":"Size","href":"/en/api-reference/supernote-plugin/types/size"},{"title":"ElementDataAccessor","href":"/en/api-reference/supernote-plugin/types/trail-data-accessor"},{"title":"Stroke","href":"/en/api-reference/supernote-plugin/types/stroke"},{"title":"PenInfo","href":"/en/api-reference/supernote-plugin/types/pen-info"},{"title":"RecognData","href":"/en/api-reference/supernote-plugin/types/recogn-data"},{"title":"RecogResultData","href":"/en/api-reference/supernote-plugin/types/recog-result-data"},{"title":"Geometry","href":"/en/api-reference/supernote-plugin/types/geometry"},{"title":"Picture","href":"/en/api-reference/supernote-plugin/types/picture"},{"title":"Template","href":"/en/api-reference/supernote-plugin/types/template"},{"title":"KeyWord","href":"/en/api-reference/supernote-plugin/types/key-word"},{"title":"Layer","href":"/en/api-reference/supernote-plugin/types/layer"},{"title":"Element","href":"/en/api-reference/supernote-plugin/types/trail"},{"title":"TextLink","href":"/en/api-reference/supernote-plugin/types/text-link"},{"title":"Link","href":"/en/api-reference/supernote-plugin/types/link"},{"title":"LassoLink","href":"/en/api-reference/supernote-plugin/types/lasso-link"},{"title":"Title","href":"/en/api-reference/supernote-plugin/types/title"},{"title":"TextBox","href":"/en/api-reference/supernote-plugin/types/text-box"},{"title":"PluginButton","href":"/en/api-reference/supernote-plugin/types/plugin-button"},{"title":"ButtonListener","href":"/en/api-reference/supernote-plugin/types/button-listener"},{"title":"ButtonSubscription","href":"/en/api-reference/supernote-plugin/types/button-subscription"},{"title":"MotionEvent","href":"/en/api-reference/supernote-plugin/types/motion-event"}]}]}]}]},{"language":"zh","pages":[{"title":"zh","href":"/zh/api-reference/supernote-plugin/plugin-note-api/insert-text-link"}]}]},"basePath":"","title":"insertTextLink - Supernote","buildId":"dpl_GRSyrvXT6FFTpZZTGz5iZPp3D2zE","deploymentId":"dpl_GRSyrvXT6FFTpZZTGz5iZPp3D2zE","dynamics":[],"chunks":[]}