Class RadzenMarkdown
A component which renders markdown content.
Implements
Inherited Members
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public class RadzenMarkdown : RadzenComponent, IDisposable
Examples
<RadzenMarkdown>
Hello, world!
- This is a list item
- This is another list item
This is a blockquote </RadzenMarkdown>
Properties
AllowedHtmlAttributes
Gets or sets a list of allowed HTML attributes. If set, only these attributes will be allowed in the markdown content. By default would use a list of safe HTML attributes.
Considered only if AllowHtml is set to true
.
Declaration
public IEnumerable<string>? AllowedHtmlAttributes { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<IEnumerable<System.String>> |
AllowedHtmlTags
Gets or sets a list of allowed HTML tags. If set, only these tags will be allowed in the markdown content. By default would use a list of safe HTML tags.
Considered only if AllowHtml is set to true
.
Declaration
public IEnumerable<string>? AllowedHtmlTags { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<IEnumerable<System.String>> |
AllowHtml
Gets or sets a value indicating whether to allow HTML content in the markdown. Certain dangerous HTML tags (script, style, object, iframe) and attributes are removed.
Set to true
by default.
Declaration
public bool AllowHtml { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
AutoLinkHeadingDepth
The maximum heading depth to create anchor links for. Set to 0
to disable auto-linking.
Declaration
public int AutoLinkHeadingDepth { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
ChildContent
Gets or sets the markdown content.
Declaration
public RenderFragment? ChildContent { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<RenderFragment> |
Text
Gets or sets the markdown content as a string. Overrides ChildContent if set.
Declaration
public string? Text { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.String> |
Methods
GetComponentCssClass()
Gets the component CSS class.
Declaration
protected override string GetComponentCssClass()
Returns
Type | Description |
---|---|
System.String |