Control properties
Configure native presentation, document binding, resource policy and replaceable services through AvaloniaHtmlEditor properties. Document content and native chrome have separate settings.
Use standard Avalonia bindings for the bindable HTML properties and awaited exports when saving the latest edited document.

Use it in your application
Set a commercial LicenseKey before constructing any editor. Show the owner window before awaiting Ready.
BodyHtml is a fragment and DocumentHtml is a full document. Content is the authoring facade; the inherited Child property owns the native visual tree.
FontFamily and FontSize style native chrome. DefaultFontFamily, DefaultFontSizeInPt and document styling APIs control authored text.
editor.IsReadOnly = false;
editor.DefaultFontFamily = "Arial";
editor.DefaultFontSizeInPt = 11;
string html = await editor.GetDocumentHtmlAsync();Members
These signatures come from the delivered 1.0.2 assemblies and XML documentation. Cancellation tokens can be supplied to awaited operations. Follow the source-specific notes above when adapting a WPF integration.
| Member | Signature |
|---|---|
AllowExternalResources | bool AllowExternalResources { get; set; } |
BackgroundImagePath | string BackgroundImagePath { get; set; } |
BaseUrl | string BaseUrl { get; set; } |
BodyCSSClassName | string BodyCSSClassName { get; set; } |
BodyColor | Color BodyColor { get; set; } |
BodyHtml | string BodyHtml { get; set; } |
BodyStyle | string BodyStyle { get; set; } |
BrowserAdapterInfo | WebViewAdapterInfo BrowserAdapterInfo { get; } |
Caret | ICaretService Caret { get; set; } |
Charset | string Charset { get; set; } |
Content | IContentService Content { get; set; } |
ContextMenuItems | ContextMenuItemReferences ContextMenuItems { get; } |
DefaultContextMenu | ContextMenu DefaultContextMenu { get; } |
DefaultFontFamily | string DefaultFontFamily { get; set; } |
DefaultFontSizeInPt | float DefaultFontSizeInPt { get; set; } |
DefaultForeColor | Color DefaultForeColor { get; set; } |
Dialog | IDialogService Dialog { get; set; } |
DisableLocalResourceSelection | bool DisableLocalResourceSelection { get; set; } |
DocumentHtml | string DocumentHtml { get; set; } |
DocumentTitle | string DocumentTitle { get; set; } |
Editor | IEditorService Editor { get; set; } |
EditorBorderColor | Color EditorBorderColor { get; set; } |
EditorBorderWidth | Thickness EditorBorderWidth { get; set; } |
EditorContextMenuStrip | ContextMenu EditorContextMenuStrip { get; set; } |
EditorMode | EditorModes EditorMode { get; set; } |
EmbedLocalImageAsBase64 | bool EmbedLocalImageAsBase64 { get; set; } |
EnableInlineSpellChecking | bool EnableInlineSpellChecking { get; set; } |
Focused | bool Focused { get; } |
FontFamily | FontFamily FontFamily { get; set; } |
FontSize | double FontSize { get; set; } |
FontStretch | FontStretch FontStretch { get; set; } |
FontStyle | FontStyle FontStyle { get; set; } |
FontWeight | FontWeight FontWeight { get; set; } |
FooterTagNavigatorFontInfo | FooterTagNavigatorFontInfo FooterTagNavigatorFontInfo { get; set; } |
FooterTagNavigatorTextColor | Color FooterTagNavigatorTextColor { get; set; } |
Foreground | IBrush Foreground { get; set; } |
Formatting | IFormattingService Formatting { get; set; } |
HeaderStyleContent | string HeaderStyleContent { get; set; } |
HeaderStyleContentElementID | string HeaderStyleContentElementID { get; set; } |
IsReadOnly | bool IsReadOnly { get; set; } |
KeyBindings | KeyBindingsManager KeyBindings { get; } |
Language | EditorLanguage Language { get; set; } |
LicenseKey | static string LicenseKey { get; set; } |
LicenseStatus | LicenseStatusInfo LicenseStatus { get; } |
MailMerge | MailMergeService MailMerge { get; } |
Options | UserOption Options { get; set; } |
ProductVersion | string ProductVersion { get; } |
Ready | Task Ready { get; } |
ScrollBarSetting | ScrollBarVisibility ScrollBarSetting { get; set; } |
Search | FindReplaceService Search { get; } |
Selection | ISelectionService Selection { get; set; } |
ShowCtrlClickTooltipOnHyperlinks | bool ShowCtrlClickTooltipOnHyperlinks { get; set; } |
Snapshot | EditorSnapshot Snapshot { get; } |
SourceEditorFontSize | double SourceEditorFontSize { get; set; } |
SpellCheckLanguage | string SpellCheckLanguage { get; set; } |
SpellCheckOptions | SpellCheckerOption SpellCheckOptions { get; set; } |
StateQuery | IStateQueryService StateQuery { get; set; } |
TableAuthoringService | TableAuthoringService TableAuthoringService { get; } |
Toolbar1 | FirstToolbar Toolbar1 { get; } |
Toolbar1Items | ItemCollection Toolbar1Items { get; } |
Toolbar1ItemsSource | IEnumerable Toolbar1ItemsSource { get; set; } |
Toolbar2 | SecondToolbar Toolbar2 { get; } |
Toolbar2Items | ItemCollection Toolbar2Items { get; } |
Toolbar2ItemsSource | IEnumerable Toolbar2ItemsSource { get; set; } |
ToolbarContextMenuStrip | ContextMenu ToolbarContextMenuStrip { get; set; } |
ToolbarFooter | FooterToolbar ToolbarFooter { get; } |
ToolbarIconSize | ToolbarIconSizes ToolbarIconSize { get; set; } |
ToolbarItemOverrider | ToolbarItemOverrideHelper ToolbarItemOverrider { get; } |
WordWrap | bool WordWrap { get; set; } |
ZoomFactor | double ZoomFactor { get; set; } |