Class RichTextGenericElement
Represents a generic HTML element within rich text content in the Delivery API.
Inheritance
object
Namespace: Umbraco.Cms.Core.Models.DeliveryApi
Assembly: Umbraco.Core.dll
Syntax
public sealed class RichTextGenericElement : IRichTextElement
Constructors
View SourceRichTextGenericElement(string, Dictionary<string, object>, IEnumerable<IRichTextElement>)
Initializes a new instance of the RichTextGenericElement class.
Declaration
public RichTextGenericElement(string tag, Dictionary<string, object> attributes, IEnumerable<IRichTextElement> elements)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tag | The tag name of the element (e.g., "p", "h1", "strong"). |
| Dictionary<string, object> | attributes | The HTML attributes of the element. |
| IEnumerable<IRichTextElement> | elements | The child elements of the element. |
Properties
View SourceAttributes
Gets the HTML attributes of the element.
Declaration
public Dictionary<string, object> Attributes { get; }
Property Value
| Type | Description |
|---|---|
| Dictionary<string, object> |
Elements
Gets the child elements of the element.
Declaration
public IEnumerable<IRichTextElement> Elements { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<IRichTextElement> |
Tag
Gets the tag name of the element (e.g., "p", "h1", "#text", "#root").
Declaration
public string Tag { get; }
Property Value
| Type | Description |
|---|---|
| string |