View Source Phoenix.WebComponent.Markdown (Phoenix.WebComponent v3.2.4)
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
Link to this section Summary
Functions
Generates a html customElement remark-element to preview markdown.
Link to this section 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
Examples
<.wc_markdown class="dark"># Hello</.wc_markdown>
#=> <remark-element class="dark"># Hello</remark-element>
<.wc_markdown class="btn"># Hello</.wc_markdown>
#=> <remark-element class="btn"># Hello</remark-element>
attributes
Attributes
id
(:any
) - html attribute id. Defaults tofalse
.class
(:any
) - html attribute class. Defaults to""
.debug
(:boolean
) - remark-element attribute, enable debug. Defaults tofalse
.content
(:string
) - markdown content. Defaults to""
.