Products · Components

RichText

Shows Markdown from your server as formatted text.

It shows headings, bold, lists, links, quotes and pictures. HTML in the Markdown shows as plain text.

Children: Nothing

Example

The RichText component
view.dml
<RichText markdown="{{ article }}" />
controller.ts
export default definePage({
  initialState: { article: "## Opening hours\n\nWe are open **Monday to Saturday**, from 8:00 to 18:00." },
});

Props

PropTypeWhat it is
markdownstring

Events

None.

Keep reading

On this page