This API inserts a sticker into the current page of the currently opened file.
Returns
APIResponse<boolean>:result === trueindicates the insertion succeeded
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Insert sticker.
static insertSticker(path: string): Promise<APIResponse<boolean>>;
| Parameter | Type | Description |
|---|---|---|
path | string | Sticker file path (.sticker) |
APIResponse<boolean>:
result === true indicates the insertion succeededimport { PluginCommAPI } from 'sn-plugin-lib';
/**
* Insert sticker example.
*/
export async function exampleInsertSticker() {
const stickerPath = '/storage/emulated/0/Note/stickers/demo.sticker';
const res = await PluginCommAPI.insertSticker(stickerPath);
if (!res.success) {
throw new Error(res.error?.message ?? 'insertSticker call failed');
}
return res.result;
}