用模板里的第一把工具摘一条
const t = await mn.api('/immersive/template');
const tool = t.excerptTools.tools[0];
const r = await mn.api('/excerpts', {
method: 'POST',
body: {
bookmd5, page, rect: { x: 82.5, y: 143.2, width: 410.8, height: 62.4 },
toolIndex: tool.index,
confirm: true
}
});
// 插件状态记在 cardNoteId 上,不是 noteid
mn.log(r.cardNoteId);{
"noteid": "8BD59972-D471-4BF0-A244-9F6F2B9F99F1",
"cardNoteId": "B9F3696A-AF8A-43B2-A8A2-2791717F1695",
"duplicateAt": []
}卡片与摘录
创建摘录
用一把摘录工具或一个划线快捷项,在文档的指定位置摘一条。摘录走模板配置的流程, 摘出来的卡带上工具配置好的标签、颜色与 AI 归属。
工具序号取自 GET /immersive/template 响应里 excerptTools.tools[].index,
与 shortcutIndex 二者取一。
响应里有两个 id:noteid 指向文档笔记本里的记录,cardNoteId 指向脑图上的卡片。
插件状态记在后者上。
POST
/
excerpts
用模板里的第一把工具摘一条
const t = await mn.api('/immersive/template');
const tool = t.excerptTools.tools[0];
const r = await mn.api('/excerpts', {
method: 'POST',
body: {
bookmd5, page, rect: { x: 82.5, y: 143.2, width: 410.8, height: 62.4 },
toolIndex: tool.index,
confirm: true
}
});
// 插件状态记在 cardNoteId 上,不是 noteid
mn.log(r.cardNoteId);{
"noteid": "8BD59972-D471-4BF0-A244-9F6F2B9F99F1",
"cardNoteId": "B9F3696A-AF8A-43B2-A8A2-2791717F1695",
"duplicateAt": []
}请求体
application/json