obsidian-dev-utils
Version:
This is the collection of useful functions that you can use for your Obsidian plugin development
27 lines (26 loc) • 983 B
text/typescript
/**
* @packageDocumentation
*
* This module provides utility functions for processing Markdown content in Obsidian.
*/
import type { App } from 'obsidian';
import { Component } from 'obsidian';
/**
* Render the markdown and embeds.
*
* @param app - The Obsidian app instance.
* @param markdown - The Markdown string to render.
* @param el - The HTMLElement to render to.
* @param sourcePath - The source path to resolve relative links.
* @param component - The Component instance.
*/
export declare function fullRender(app: App, markdown: string, el: HTMLElement, sourcePath: string, component: Component): Promise<void>;
/**
* Converts Markdown to HTML.
*
* @param app - The Obsidian app instance.
* @param markdown - The Markdown string to convert.
* @param sourcePath - (optional) The source path to resolve relative links.
* @returns The HTML string.
*/
export declare function markdownToHtml(app: App, markdown: string, sourcePath?: string): Promise<string>;