@svelte-parts/markdown
TypeScript icon, indicating that this package has built-in type declarations

0.0.23 • Public • Published

@svelte-parts/markdown

For markdown blocks

Demo

Try it out in the svelte REPL

Install

npm install @svelte-parts/markdown

Usage

<Markdown>
# Title

## List

1. one
2. two
3. three
</Markdown>

Uses marked to convert to HTML and is sanitized with dompurify. Both can be configured with the optional attributes:

  • dompurifyConfig (type: DOMPurify.Config)
  • markedExtensions (type: MarkedExtension[])
  • markedOptions (type: MarkedOptions)

/@svelte-parts/markdown/

    Package Sidebar

    Install

    npm i @svelte-parts/markdown

    Weekly Downloads

    0

    Version

    0.0.23

    License

    MIT

    Unpacked Size

    2.36 kB

    Total Files

    5

    Last publish

    Collaborators

    • idris-maps