View Source PhoenixDuskmoon.Markdown (PhoenixDuskmoon v4.5.0)

Render markdown in to remark-element.

The remark-element supported markdown featrues:

  • github flavor
  • auto highlight code with lowlight.js and auto detect system light/dark themes.
  • charts render by mermaid.js

Summary

Functions

Generates a html customElement remark-element to preview markdown.

Functions

Generates a html customElement remark-element to preview markdown.

Docs of remark-element (See https://gsmlg-dev.github.io/lit/?path=/story/gsmlg-remark-element--basic).

Examples

<.dm_markdown class="dark"># Hello</.dm_markdown>
#=> <remark-element class="dark"># Hello</remark-element>

<.dm_markdown class="btn"># Hello</.dm_markdown>
#=> <remark-element class="btn"># Hello</remark-element>

Attributes

  • id (:any) - html attribute id. Defaults to false.
  • class (:any) - html attribute class. Defaults to "".
  • debug (:boolean) - remark-element attribute, enable debug. Defaults to false.
  • content (:string) - markdown content. Defaults to "".