IHtmlTagHandler Interface
Definition
Interface for custom HTML tag handlers that transform specific tags into Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder operations.
public interface IHtmlTagHandler
Remarks
Register handlers by passing them to the Avalonia.Controls.Documents.Serialization.Html.HtmlSerializerOptions constructor; they surface on Avalonia.Controls.Documents.Serialization.Html.HtmlSerializerOptions.TagHandlers. Built-in tags are processed first; custom handlers are only consulted for tags that do not have a built-in mapping.
Methods
| Name | Description |
|---|---|
| HandleCloseTag | No summary available. |
| HandleOpenTag | No summary available. |
| HandleSelfClosingTag | No summary available. |
HandleCloseTag Method
public void HandleCloseTag(Avalonia.Controls.Documents.Serialization.Html.HtmlReaderContext context, ReadOnlySpan<char> tagName)
Parameters
context Avalonia.Controls.Documents.Serialization.Html.HtmlReaderContext
tagName ReadOnlySpan<char>
HandleOpenTag Method
public void HandleOpenTag(Avalonia.Controls.Documents.Serialization.Html.HtmlReaderContext context, ReadOnlySpan<char> tagName, Avalonia.Controls.Documents.Serialization.Html.HtmlTagAttributes attributes)
Parameters
context Avalonia.Controls.Documents.Serialization.Html.HtmlReaderContext
tagName ReadOnlySpan<char>
attributes Avalonia.Controls.Documents.Serialization.Html.HtmlTagAttributes
HandleSelfClosingTag Method
public void HandleSelfClosingTag(Avalonia.Controls.Documents.Serialization.Html.HtmlReaderContext context, ReadOnlySpan<char> tagName, Avalonia.Controls.Documents.Serialization.Html.HtmlTagAttributes attributes)
Parameters
context Avalonia.Controls.Documents.Serialization.Html.HtmlReaderContext
tagName ReadOnlySpan<char>
attributes Avalonia.Controls.Documents.Serialization.Html.HtmlTagAttributes
Properties
| Name | Description |
|---|---|
| IsBlockLevel | Whether this tag acts as a block-level element (creates paragraphs/structures) rather than an inline element (applies formatting within a paragraph). |
IsBlockLevel Property
Whether this tag acts as a block-level element (creates paragraphs/structures) rather than an inline element (applies formatting within a paragraph).
public bool IsBlockLevel { get; set; }