blockProvider

fun blockProvider(fallback: @Composable (unknownComponent: Component, Modifier) -> Unit = { it, _ -> throw IllegalStateException("Unknown component ${it.component}") }, storyLinkListener: (uuid: Uuid, anchor: String?) -> Unit = { _, _ -> TODO("No storyLinkListener provided to blockProvider()") }, builder: BlockProviderScope.() -> Unit): BlockProvider(source)

Creates a BlockProvider with default Material 3 composables for all RichText node types.

Registers sensible defaults for rendering headings, paragraphs, lists, tables, code blocks, images, and inline text marks using Material 3 typography and color scheme.

Custom component composables and overrides can be registered via the builder block.

Parameters

fallback

Composable rendered for unknown or unregistered components.

storyLinkListener

Callback invoked when a story link is clicked, receiving the story UUID and optional anchor.

builder

Configuration block for registering block composables via BlockProviderScope.