@mdsrs/markdown
v0.0.0
Published
Safe Markdown, math, and media rendering for `mdsrs` card faces.
Readme
@mdsrs/markdown
Safe Markdown, math, and media rendering for mdsrs card faces.
Example
import { renderCard, renderMarkdown } from '@mdsrs/markdown';
const html = renderMarkdown('The derivative is $2x$.');
const card = renderCard({
filePath: 'math/algebra.md',
frontMarkdown: 'What is $x + x$?',
backMarkdown: '$2x$'
});Media
Markdown image syntax is reused for media:
renders an image.renders a controlled video.renders a controlled audio player.
Use resolveAsset to map Markdown URLs to application URLs.
