plushie/widget/markdown

Markdown display widget builder.

Types

pub opaque type Markdown

Option type for markdown properties.

pub type Opt {
  Width(length.Length)
  TextSize(Float)
  H1Size(Float)
  H2Size(Float)
  H3Size(Float)
  CodeSize(Float)
  Spacing(Float)
  LinkColor(color.Color)
  CodeTheme(String)
  A11y(a11y.A11y)
}

Constructors

  • Width(length.Length)
  • TextSize(Float)
  • H1Size(Float)
  • H2Size(Float)
  • H3Size(Float)
  • CodeSize(Float)
  • Spacing(Float)
  • LinkColor(color.Color)
  • CodeTheme(String)
  • A11y(a11y.A11y)

Values

pub fn a11y(md: Markdown, a: a11y.A11y) -> Markdown

Set accessibility properties for this widget.

pub fn build(md: Markdown) -> node.Node

Build the markdown into a renderable Node.

pub fn code_size(md: Markdown, s: Float) -> Markdown

Set the code block font size.

pub fn code_theme(md: Markdown, t: String) -> Markdown

Set the code block syntax theme.

pub fn h1_size(md: Markdown, s: Float) -> Markdown

Set the h1 heading font size.

pub fn h2_size(md: Markdown, s: Float) -> Markdown

Set the h2 heading font size.

pub fn h3_size(md: Markdown, s: Float) -> Markdown

Set the h3 heading font size.

pub fn link_color(md: Markdown, c: color.Color) -> Markdown

Set the link color.

pub fn new(id: String, content: String) -> Markdown

Create a new markdown builder.

pub fn spacing(md: Markdown, s: Float) -> Markdown

Set the spacing between children.

pub fn text_size(md: Markdown, s: Float) -> Markdown

Set the text size in pixels.

pub fn width(md: Markdown, w: length.Length) -> Markdown

Set the width.

pub fn with_opts(md: Markdown, opts: List(Opt)) -> Markdown

Apply a list of options to a markdown builder.

Search Document