Returns
APIResponse<Element[]>: SeeElementfor element types and fields.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Get page elements, including strokes, links, titles, TextBox elements, and five-star elements.
static getElements(page: number, NOTEPath: string): Promise<APIResponse<Element[]>>;
| Parameter | Type | Description |
|---|---|---|
page | number | Page index (starts from 0) |
NOTEPath | string | NOTE/DOC file path |
APIResponse<Element[]>:
See Element for element types and fields.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;
}