View Source Phoenix.WebComponent.Markdown (Phoenix.WebComponent v0.0.0)
Conveniences for working with links and URLs in HTML.
Link to this section Summary
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).
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).
Useful to ensure that links that change data are not triggered by search engines and other spidering software.
Examples
wc_remark("# Hello", class: "dark")
#=> <remark-element class="dark" content="# Hello"></remark-element>
wc_remark(content: "# Hello", class: "btn")
#=> <remark-element class="btn" content="# Hello"></remark-element>
Options
:debug
- print log in browser console:content
- The content of markdown, replace innerHTML.
All other options are forwarded to the underlying button input.