ArticleElement

sealed interface ArticleElement

Represents a single element within an article's body. Elements are ordered and typed — the type property determines which concrete subtype to expect. Elements are either text-based subtypes each carrying a value string, or image-based (ArticleImage).

Known type values:

Any unrecognised type is represented as Unknown, which preserves the raw type string.

Inheritors

Properties

Link copied to clipboard
abstract val type: String

Which kind of element this is. Prefer matching on the concrete subtype; this is the raw string behind it.