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 insertNotePage(params: { notePath: string; page: number; template: string }): Promise<APIResponse<boolean>>;
Parameters
| Parameter | Type | Description |
|---|
params.notePath | string | Note file path |
params.page | number | Page number (starts from 0) |
params.template | string | Template name for the new page |
Returns
Example
import { PluginFileAPI } from 'sn-plugin-lib';
/**
* Insert new page example.
*/
export async function exampleInsertNotePage() {
const res = await PluginFileAPI.insertNotePage({
notePath: '/storage/emulated/0/Note/demo.note',
page: 2,
template: 'style_blank',
});
if (!res.success) {
throw new Error(res.error?.message ?? 'insertNotePage call failed');
}
return res.result;
}