Skip to main content
This API inserts a sticker into the current page of the currently opened file.
static insertSticker(path: string): Promise<APIResponse<boolean>>;
Parameters
ParameterTypeDescription
pathstringSticker file path (.sticker)
Returns

Example

import { 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;
}