Raxol.UI.Components.MarkdownRenderer (Raxol v0.4.0)

View Source

Renders Markdown text into Raxol elements or raw HTML.

Requires the earmark dependency.

Summary

Functions

Handles events for the MarkdownRenderer component. No events are handled by default.

Initializes the MarkdownRenderer component state from props.

Renders the given Markdown string.

Updates the MarkdownRenderer component state. No updates are handled by default.

Functions

broadcast(msg)

command(cmd)

handle_event(event, state, context)

@spec handle_event(term(), map(), map()) :: {map(), list()}

Handles events for the MarkdownRenderer component. No events are handled by default.

init(props)

@spec init(map()) :: map()

Initializes the MarkdownRenderer component state from props.

mount(state)

Callback implementation for Raxol.UI.Components.Base.Component.mount/1.

render(state, context)

@spec render(map(), map()) :: any()

Renders the given Markdown string.

schedule(msg, delay)

unmount(state)

Callback implementation for Raxol.UI.Components.Base.Component.unmount/1.

update(message, state)

@spec update(term(), map()) :: map()

Updates the MarkdownRenderer component state. No updates are handled by default.