APIResponse<boolean>:result === truemeans the current view supports handwriting, andresult === falsemeans it does not support handwriting
PluginCommAPI
canHandwrite
Check whether the current view supports handwriting.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Check whether the current view supports handwriting.
static canHandwrite(): Promise<APIResponse<boolean>>;
APIResponse<boolean>:
result === true means the current view supports handwriting, and result === false means it does not support handwritingimport { PluginCommAPI } from 'sn-plugin-lib';
/**
* Example: check whether the current view supports handwriting.
*/
export async function exampleCanHandwrite() {
const res = await PluginCommAPI.canHandwrite();
if (!res.success) {
console.log('canHandwrite failed', res.error);
throw new Error(res.error?.message ?? 'canHandwrite call failed');
}
console.log('canHandwrite result', res.result);
return res.result;
}