Skip to main content
static deleteKeyWord(NOTEPath: string, page: number, index: number): Promise<APIResponse<boolean>>;
Parameters
ParameterTypeDescription
NOTEPathstringNOTE/DOC file path
pagenumberPage index where the keyword is located (starts from 0)
indexnumberKeyword index within the page (starts from 1)
Returns

Example

import { PluginFileAPI } from 'sn-plugin-lib';

/**
 * Example: delete a keyword.
 */
export async function exampleDeleteKeyWord() {
 const NOTEPath = '/storage/emulated/0/Note/demo.note';
 const page = 1;
 const index = 1;

 const res = await PluginFileAPI.deleteKeyWord(NOTEPath, page, index);
 if (!res.success) {
 throw new Error(res.error?.message ?? 'deleteKeyWord call failed');
 }
 return res.result;
}