> ## 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.

# PluginDocAPI

> DOC-related API index.

<Note>
  APIs in this section can only be called in DOC; NOTE cannot call these APIs.
</Note>

## Import

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

## Return Convention

Most async APIs return [`APIResponse<T>`](/en/api-reference/supernote-plugin/types/api-response). Read `result` only when `success === true`.

## Methods

* [getLastSelectedText](/en/api-reference/supernote-plugin/plugin-doc-api/get-last-selected-text)
* [getCurrentDocText](/en/api-reference/supernote-plugin/plugin-doc-api/get-current-doc-text)
* [getCurrentTotalPages](/en/api-reference/supernote-plugin/plugin-doc-api/get-current-total-pages)
