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.
JavaScript
const r = await mn.api('/notes/' + noteid + '/comments', { method: 'POST', body: { text: '这句话是本段的中心句。', confirm: true } }); if (r.error) mn.log(r.error.code);
200
构造示例,未实测
{ "storedType": "text", "storedText": "这句话是本段的中心句。", "styled": true }
追加一条批注。正文整条写成一个指向别处的应用内链接时,该条批注成为真正的双向链接。
format 只在新增时接受,改写现成的批注时带上该参数会被判非法。样式只有在按富文本写入时有效, MarginNote 移除样式时响应里的 styled 为 false。
format
styled
false
field 与 fieldLabel 用来把该条批注标成某个字段的值,便于同一张卡上放多组结构化内容。
field
fieldLabel
卡片的 noteid。取自卡片命令响应的 noteid、POST /notes/batch-get 响应里 items[].noteid,或 GET /ui-state 的 state.focusnoteid。
noteid
POST /notes/batch-get
items[].noteid
GET /ui-state
state.focusnoteid
批注正文。整条写成一个 marginnote4app://note/… 链接时,该条批注成为真正的双向链接。
marginnote4app://note/…
必填。由 MarginNote 自动补上。
正文的解析方式。改写现成批注时不接受该项。
text
markdown
html
rich
只有 format 为 rich 时生效。MarginNote 移除样式时响应里的 styled 为 false。
Show child attributes
标出该条批注所属的字段,便于同一张卡上放多组结构化内容。
是否显示字段名。
响应。可能还有未列出的字段。
样式是否被保留。为 false 表示 MarginNote 移除了样式。
此页面对您有帮助吗?