Skip to content

markdown

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

Interface Description
FullRenderParams The params for the full render.
MarkdownToHtmlParams Parameters for markdownToHtml.
RegisterLinkHandlersParams Parameters for registerLinkHandlers.
RenderExternalLinkParams Parameters for renderExternalLink.
RenderInternalLinkFolderNoteOptions The folder-note setup renderInternalLink resolves a folder link’s note with — everything resolveFolderNoteConfig takes except the app, which the link already carries.
RenderInternalLinkParams Parameters for renderInternalLink.
Function Description
fullRender Render the markdown and embeds.
markdownToHtml Converts Markdown to HTML.
registerLinkHandlers Registers link handlers for the given element.
renderExternalLink Renders an external link.
renderInternalLink Renders 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.