import { markdownToNoteHtml } from "../../utils/markdown"; export async function createChildNote(options: { parentItem: Zotero.Item; title: string; bodyMarkdown: string; }): Promise { const note = new Zotero.Item("note"); note.libraryID = options.parentItem.libraryID; note.parentID = options.parentItem.id; const html = markdownToNoteHtml(options.title, options.bodyMarkdown); note.setNote(html); await note.saveTx(); return note; }