DxHtmlEditor.MarkupType Property
Specifies the markup language in which the HTML Editor stores its markup.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.1.dll
NuGet Package: DevExpress.Blazor
Declaration
[DefaultValue(HtmlEditorMarkupType.Html)]
[Parameter]
public HtmlEditorMarkupType MarkupType { get; set; }
Property Value
Type | Default | Description |
---|---|---|
HtmlEditorMarkupType | Html | An enumeration value. |
Available values:
Name | Description |
---|---|
Html | HyperText Markup Language (HTML). |
Markdown | Markdown markup language. |
Remarks
The HTML Editor stores its markup in the Markup property in HTML format.
In Html, the editor can store the following formatting attributes:
- Bold, italic, strikethrough, underlined, subscript, and superscript text
- Font, font size, and text color
- Headings
- Text alignment
- Bullet and numbered lists
- Code blocks and quotes
- Hyperlinks, images, and tables
Use the MarkupType
property to change the markup language to Markdown
. Note that in Markdown, the HTML Editor can store a limited number of formatting attributes:
- Bold and italic text
- Headings
- Bullet and numbered lists
- Quotes
- Hyperlinks, images, and tables
When the MarkupType
property is set to Markdown
, the editor disables toolbar commands that correspond to unsupported formats.
Example
The following code snippet uses Markdown
markup language to store the editor’s markup:
<DxHtmlEditor @bind-Markup="@Markup"
MarkupType="HtmlEditorMarkupType.Markdown"
Height="200px"
Width="100%" />
<p><b>The result markup:</b> @Markup</p>
@code {
string Markup { get; set; } = "";
}