> ## Documentation Index
> Fetch the complete documentation index at: https://docs.supernote.com/llms.txt
> Use this file to discover all available pages before exploring further.

# getLassoText

> 获取套索的文本框数据。

<Note>
  必须套索之后调用该接口，否则会调用失败。

  建议在点击套索工具栏按钮后进入的插件界面调用该接口。
</Note>

```ts theme={null}
static getLassoText(): Promise<APIResponse<TextBox[]>>;
```

**返回**

* [`APIResponse<TextBox[]>`](/zh/api-reference/supernote-plugin/types/api-response)：
  `result` 为 [`TextBox`](/zh/api-reference/supernote-plugin/types/text-box)\[] 文本框数组

## 示例

```ts wrap theme={null}
import { PluginNoteAPI } from 'sn-plugin-lib';

/**
 * 获取套索文本框列表的示例。
 */
export async function exampleGetLassoText() {
  const res = await PluginNoteAPI.getLassoText();
  if (!res.success) {
    throw new Error(res.error?.message ?? 'getLassoText 调用失败');
  }
  return res.result;
}
```
