Raxol.UI.Components.MarkdownRenderer (Raxol v2.0.1)

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.

Mount hook - called when component is mounted. No special setup needed for MarkdownRenderer.

Renders the given Markdown string.

Unmount hook - called when component is unmounted. No cleanup needed for MarkdownRenderer.

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)

@spec mount(map()) :: {map(), list()}

Mount hook - called when component is mounted. No special setup needed for MarkdownRenderer.

render(state, context)

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

Renders the given Markdown string.

schedule(msg, delay)

unmount(state)

@spec unmount(map()) :: map()

Unmount hook - called when component is unmounted. No cleanup needed for MarkdownRenderer.

update(message, state)

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

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