Skip to content
IzzyBlazor

Enter all results ↑ ↓ move Esc close

Styling the content

Since 0.1.0-alpha.22
The text uses Prose's styles, so it looks the same in the editor and where it's shown.

The text is part of the page, not a frame, and has Prose's styles: what you edit looks like what RichText shows. The theme's tokens reach it as they reach everything else. FontSize sets the text's size, on Prose's scale. For rules of your own, give the editor a ContentClass and RichText the same Class; Prose's rules have the lowest weight, so yours win.

A class on the content

This help article is large text, and its headings are the primary color, in the editor and, below it, as RichText shows it.

Static

Preview

Text style

Changing your plan

Go to Settings › Billing and choose a plan. The change starts on your next bill.

Insert image

What the image shows, for people who can't see it.

Insert table

As RichText shows it

Changing your plan

Go to Settings › Billing and choose a plan. The change starts on your next bill.

Code

ContentStyle.razor
@* A help article: larger text, and the article's own heading style on both the editor and the
   published page. *@
<Stack Gap="6" Grow>
    <RichTextEditor @bind-Value="_article" Label="Article" FontSize="ProseSize.Lg" ContentClass="help-article" />
    @* A labeled line, not a card: RichText draws no box of its own. *@
    <Divider Label="As RichText shows it" />
    <RichText Html="@_article" Size="ProseSize.Lg" Class="help-article" />
</Stack>

<style>
    .help-article h3 { color: var(--ib-color-primary); }
</style>

@code {
    private string? _article = "<h3>Changing your plan</h3><p>Go to <strong>Settings › Billing</strong> and choose a plan. The change starts on your next bill.</p>";
}

Connection lost

Rejoining the server…