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 insertKeyWord(NOTEPath: string, page: number, keyword: string):
Promise<APIResponse<boolean>>;
Parameters
| Parameter | Type | Description |
|---|
NOTEPath | string | NOTE/DOC file path |
page | number | Page number (starts from 0) |
keyword | string | Keyword content |
Returns
Example
import { PluginFileAPI } from 'sn-plugin-lib';
/**
* Insert keyword example.
*/
export async function exampleInsertKeyWord() {
const NOTEPath = '/storage/emulated/0/Note/demo.note';
const page = 1;
const keyword = 'TODO';
const res = await PluginFileAPI.insertKeyWord(NOTEPath, page, keyword);
if (!res.success) {
throw new Error(res.error?.message ?? 'insertKeyWord call failed');
}
return res.result;
}