Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
获取最近一次选中的文本内容。
static getLastSelectedText(): Promise<APIResponse<string>>;
APIResponse<string>
result
import { PluginDocAPI } from 'sn-plugin-lib'; /** * 获取最近一次选中文本的示例。 */ export async function exampleGetLastSelectedText() { const res = await PluginDocAPI.getLastSelectedText(); if (!res.success) { throw new Error(res.error?.message ?? 'getLastSelectedText 调用失败'); } return res.result; }