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.
Only NOTE files have title data; DOC files do not.
static getTitles(NOTEPath: string, pageList: number[]): Promise<APIResponse<Title[]>>;
Parameters
| Parameter | Type | Description |
|---|
NOTEPath | string | NOTE file path |
pageList | number[] | Page index list (starts from 0) |
Returns
Example
import { PluginFileAPI } from 'sn-plugin-lib';
/**
* Example: get titles of specified pages.
*/
export async function exampleGetTitles() {
const NOTEPath = '/storage/emulated/0/Note/demo.note';
const res = await PluginFileAPI.getTitles(NOTEPath, [0, 1, 2]);
if (!res.success) {
throw new Error(res.error?.message ?? 'getTitles call failed');
}
return res.result;
}