# RichText
> AstrolRichText is a dynamic Blazor component that elevates the presentation of textual content to new heights. Unlike a simple text field, it allows for advanced formatting such as bold, italic, numbered or bulleted lists, enriching expression and style. This versatile tool is particularly useful for creating diverse content, from blog entries to detailed documents, providing users with the ability to express themselves with greater flexibility and expressiveness. Content creation becomes more intuitive and visually appealing.
Source page: https://doc.astrolui.com/rich-text/rich-text-component
## 1. Demo AstrolRichText
In this example, [buttons](/basic-component/button), [modal](/basic-component/modal), and [the loading component](/basic-component/load) are implemented, so it is recommended to refer to the corresponding documentation.
**If you have ad blockers in your browser, it may affect the component's behavior.**
```razor
@using Astrol.Entities.Basic.UI
@using Astrol.Component.RichText
@using Astrol.Component.Basic.Button
@using Astrol.Component.Basic.Modal
@using Astrol.Component.Basic.Load
@((MarkupString) _htmlContent)
@code {
```
```csharp
private string _htmlContent = "";
private bool _statusModal = false;
private bool _load = false;
private AstrolRichText? _astrolRichText;
public async Task GetHTML()
{
_load = true;
if (_astrolRichText != null)
_htmlContent = await _astrolRichText.GetHTMLAsync();
_statusModal = true;
_load = false;
}
}
```
### Supported parameters
- **ReadOnly** (bool), defines whether the component is in read-only mode (default is **false**).
- **IsBottomToolbar** (bool), defines if the options bar is displayed at the bottom (default is **false**).
- **MinHeight** (string), minimum height (default is **150px**). MinHeight and MaxHeight apply to each editor separately.
- **MaxHeight** (string), maximum height (default is **200px**).
- **Placeholder** (string), text to display in the component's placeholder (not required).
- **ToolbarClass** (string), CSS class to define for the options bar (not required).
- **ContentClass** (string), CSS class to define for the content (not required).
- The options bar is accessible: every button has a name and does not submit forms (**type="button"**).
- **FullRender** (EventCallback), event that notifies when the component has loaded completely (not required).
- Configuration of the options bar, all of type **(bool)**, allowing them to be disabled as all are set to **true** by default:
- ShowFont
- ShowSize
- ShowBold
- ShowItalic
- ShowUnderline
- ShowStrike
- ShowColor
- ShowBackground
- ShowListOrdered
- ShowListBullet
- ShowIndentPlus
- ShowIndentLess
- ShowAlign
- ShowHeader1
- ShowHeader2
- ShowBlockquote
- ShowCodeBlock
- ShowScriptSub
- ShowScriptSuper
- ShowFormula (requires [KaTeX](https://katex.org) loaded on the page; without it the button is hidden)
- ShowLink
- ShowImage
- ShowVideo
### Public methods
- **GetTextAsync**, allows you to retrieve the text written in the component (returns a **string**).
- **GetHTMLAsync**, allows you to retrieve the HTML content of the component (returns a **string**).
- **GetContentAsync**, allows you to retrieve the content (JSON) of the component (returns a **string**).
- **SetContentAsync**, allows you to insert content (JSON) into the component (takes a **string** as input).
- **SetHTMLAsync**, replaces the content with HTML (takes a **string**). It is converted to the formats the editor supports and scripts, event attributes (**onerror**, **onclick**...) and **javascript:** links are removed, so it is safe with user HTML.
- **SetTextAsync**, allows you to insert text into the component (takes a **string** as input).
- **SetStatusAsync**, allows you to set or modify the state of the component (takes a **bool** as input).
- **InsertImageAsync**, allows you to insert an image into the component (takes a **string** representing the image URL).
- **InsertVideoAsync**, allows you to insert a video into the component (takes a **string** representing the video URL).