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.
文档的中的手写元素不是直接写在文档文件中的,而是写在文档文件对应的mark文件上的。
static clearMarkElements(filePath: string, page: number): Promise<APIResponse<boolean>>;
参数
| 参数 | 类型 | 说明 |
|---|
filePath | string | 文档文件路径 |
page | number | 文档文件的页码(从 0 开始) |
返回
import { PluginFileAPI } from 'sn-plugin-lib';
/**
* 清除某页 mark 元素的示例。
*/
export async function exampleClearMarkElements() {
const filePath = '/storage/emulated/0/Note/demo.pdf';
const page = 1;
const res = await PluginFileAPI.clearMarkElements(filePath, page);
if (!res.success) {
throw new Error(res.error?.message ?? 'clearMarkElements 调用失败');
}
return res.result;
}