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.
static getElements(page: number, NOTEPath: string): Promise<APIResponse<Element[]>>;
Parameters
| Parameter | Type | Description |
|---|
page | number | Page index (starts from 0) |
NOTEPath | string | NOTE/DOC file path |
Returns
Example
import { PluginFileAPI } from 'sn-plugin-lib';
/**
* Example: get elements on a page.
*/
export async function exampleGetElements() {
const NOTEPath = '/storage/emulated/0/Note/demo.note';
const page = 1;
const res = await PluginFileAPI.getElements(page, NOTEPath);
if (!res.success) {
throw new Error(res.error?.message ?? 'getElements call failed');
}
return res.result;
}