Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Insert a layer.
static insertLayer(NOTEPath: string, page: number, layer: Layer): Promise<APIResponse<boolean>>;
NOTEPath
string
page
number
0
layer
Layer
APIResponse<boolean>
result === true
import { PluginFileAPI, type Layer } from 'sn-plugin-lib'; /** * Insert layer example. */ export async function exampleInsertLayer() { const NOTEPath = '/storage/emulated/0/Note/demo.note'; const page = 1; const layer: Layer = { layerId: 1, name: 'new layer', isCurrentLayer: false, isVisible: true, }; const res = await PluginFileAPI.insertLayer(NOTEPath, page, layer); if (!res.success) { throw new Error(res.error?.message ?? 'insertLayer call failed'); } return res.result; }