Skip to content

MbBookNote

插件开发中最核心的数据对象,代表一条笔记(脑图节点)。可通过 Database.getNoteByIdNotebookController.focusNoteMindMapNode.note 等获取。修改后建议使用 UndoManager.undoGrouping 包裹并刷新界面。

属性类型说明
noteTitlestring笔记标题。
excerptTextstring摘录文本。
colorIndexnumber颜色索引 (0–15)。
fillIndexnumber填充类型。
mindmapPositionCGPoint脑图中的位置。
属性类型说明
noteIdstring笔记唯一 ID。
docMd5string来源文档 MD5。
notebookIdstring所属笔记本 ID。
startPage / endPageNSNumber摘录起止页码。
startPos / endPosstring摘录起止位置。
excerptPicNSDictionary摘录图片信息。
createDate / modifiedDateNSDate创建/修改时间。
mediaListstring媒体列表。
originNoteIdstring原始笔记 ID(如 Evernote)。
mindmapBranchCloseNSNumber脑图分支是否折叠。
notesTextstring笔记文本聚合。
groupNoteIdstring分组笔记 ID。
commentsNSArray评论数组,元素为 NoteComment 结构。
parentNoteMbBookNote | undefined父笔记。
linkedNotesNSArray链接的笔记。
childNotesNSArray子笔记数组。
summaryLinksNSArray摘要链接。
zLevel / hidden / toc / annotation / textFirst / groupMode / flashcard / flaggedNSNumber各类标志。
summaryboolean是否有摘要链接(getter hasSummaryLinks)。
textHighlight / optionsNSDictionary文本高亮与选项。
方法参数返回值说明
appendTextComment(text)text: stringvoid添加一条文本评论。
appendNoteLink(note)note: MbBookNotevoid添加指向另一条笔记的链接(JS 中也可用 addNoteLink)。
appendHtmlComment(html, text, tag)html, text, tag: stringvoid添加 HTML 评论。
removeCommentByIndex(index)index: numbervoid按索引删除一条评论。
clearFormat()void清除笔记文本格式。
paste()void粘贴。
allNoteText()string获取笔记全部文本。
方法参数返回值说明
createWithTitle(title, notebook, document)title: string;notebook: MbTopic;document: MbBookMbBookNote在指定笔记本与文档下创建一条新笔记。