Skip to content

obsidian/markdown

This module provides utility functions for processing Markdown content in Obsidian.

InterfaceDescription
FullRenderParamsThe params for the full render.
MarkdownToHtmlParamsParameters for markdownToHtml.
RegisterLinkHandlersParamsParameters for registerLinkHandlers.
RenderExternalLinkParamsParameters for renderExternalLink.
RenderInternalLinkFolderNoteOptionsThe folder-note setup renderInternalLink resolves a folder link’s note with — everything resolveFolderNoteConfig takes except the app, which the link already carries.
RenderInternalLinkParamsParameters for renderInternalLink.
FunctionDescription
fullRenderRender the markdown and embeds.
markdownToHtmlConverts Markdown to HTML.
registerLinkHandlersRegisters link handlers for the given element.
renderExternalLinkRenders an external link.
renderInternalLinkRenders an internal link. What clicking the rendered link does depends on what it names: - A FILE is opened by Obsidian’s own link handler — and, with RenderInternalLinkParams.shouldRevealFile, additionally revealed in the file explorer. - A FOLDER cannot be opened, so its FOLDER NOTE is — the note whose properties describe the folder itself, resolved through resolveFolderNote (by default from the installed folder-notes plugin’s live configuration). The reveal lands on that note, unless the note is hidden in the explorer, in which case it lands on the folder — revealing a hidden note would highlight nothing. A folder with NO folder note reveals the folder and opens nothing: nothing here ever creates a note. Everything is resolved at CLICK time rather than at render time, deliberately: a rendered link outlives the operation that produced it, so a destination renamed in between still reveals the right item, and a folder note written after the link appeared is still found.