Class RichTextRootElement
Represents the root element of rich text content in the Delivery API.
Inheritance
object
Namespace: Umbraco.Cms.Core.Models.DeliveryApi
Assembly: Umbraco.Core.dll
Syntax
public sealed class RichTextRootElement : IRichTextElement
Constructors
View SourceRichTextRootElement(Dictionary<string, object>, IEnumerable<IRichTextElement>, IEnumerable<ApiBlockItem>)
Initializes a new instance of the RichTextRootElement class.
Declaration
public RichTextRootElement(Dictionary<string, object> attributes, IEnumerable<IRichTextElement> elements, IEnumerable<ApiBlockItem> blocks)
Parameters
| Type | Name | Description |
|---|---|---|
| Dictionary<string, object> | attributes | The HTML attributes of the root element. |
| IEnumerable<IRichTextElement> | elements | The child elements of the root element. |
| IEnumerable<ApiBlockItem> | blocks | The block items embedded in the rich text content. |
Properties
View SourceAttributes
Gets the HTML attributes of the root element.
Declaration
public Dictionary<string, object> Attributes { get; }
Property Value
| Type | Description |
|---|---|
| Dictionary<string, object> |
Blocks
Gets the block items embedded in the rich text content.
Declaration
public IEnumerable<ApiBlockItem> Blocks { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<ApiBlockItem> |
Elements
Gets the child elements of the root 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 |