Avalonia.Controls.RichTextEditor 12.2.1

Prefix Reserved
dotnet add package Avalonia.Controls.RichTextEditor --version 12.2.1
                    
NuGet\Install-Package Avalonia.Controls.RichTextEditor -Version 12.2.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Avalonia.Controls.RichTextEditor" Version="12.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Avalonia.Controls.RichTextEditor" Version="12.2.1" />
                    
Directory.Packages.props
<PackageReference Include="Avalonia.Controls.RichTextEditor" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Avalonia.Controls.RichTextEditor --version 12.2.1
                    
#r "nuget: Avalonia.Controls.RichTextEditor, 12.2.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Avalonia.Controls.RichTextEditor@12.2.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Avalonia.Controls.RichTextEditor&version=12.2.1
                    
Install as a Cake Addin
#tool nuget:?package=Avalonia.Controls.RichTextEditor&version=12.2.1
                    
Install as a Cake Tool

Avalonia.Controls.RichTextEditor

A rich text editing control for Avalonia UI applications. Provides a FlowDocumentScrollViewer for read-only display and a RichTextEditor control with full editing, selection, keyboard/mouse handling, undo/redo, and extensible highlighting.

Features

  • RichTextEditor control with full editing support
  • FlowDocumentScrollViewer for read-only document rendering
  • Keyboard and mouse input handling
  • Caret and selection management
  • Extensible highlight layers
  • Block adorner system
  • Editor toolbar with overflow menu support

Quick Start

<RichTextEditor>
  <FlowDocument>
    <Paragraph>
      <Run>Hello, rich text!</Run>
    </Paragraph>
  </FlowDocument>
</RichTextEditor>

Dependencies

  • Avalonia.Controls.Documents

Documentation

See the documentation for more details.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Avalonia.Controls.RichTextEditor:

Package Downloads
Devolutions.AvaloniaControls.SpreadsheetEditor

An Excel-like spreadsheet editor control for Avalonia UI: a custom grid with cell merging, rich in-cell editing, a formula engine, charts, multi-sheet tabs, undo/redo, and printing. Requires the commercial Avalonia Accelerate packages (a valid Avalonia UI license key must be supplied by the consuming application).

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
12.2.1 72 7/29/2026
12.2.0 1,651 7/23/2026
12.1.5 1,385 6/29/2026
12.1.4 849 6/22/2026
12.1.3 182 6/9/2026
12.1.2 137 6/2/2026
12.1.1 161 5/14/2026
12.1.0 445 5/12/2026

## 12.2.1

### Features
- Undo is document-scoped. An editor adopts the document's existing undo manager and creates one only when the document has none, so several editors over one shared document drive a single stack — an edit made in one editor can be undone from another — and a document keeps its undo history across editor swaps. Behavioral change: the manager is no longer disposed when an editor lets go of a document (its lifetime follows the document), and the `UndoLimit` of an editor that adopts an existing manager does not resize the already-created stack.

### Fixes
- Switching the editor to another document clears the previous document's selection highlight. The new document starts with an empty selection, but nothing repainted the highlight layer until the next selection change, so the rectangles drawn for the old selection stayed on screen over unrelated text until the first click.
- Pointing the editor at another document no longer strips the formatting of the document it lets go of. Releasing a document severed every element from its node, and the next read rebuilt those elements at default formatting - bold, sizes and colours were gone from the elements, from any view still showing the document, and from everything saved or cloned afterwards. It hit any master/detail app that binds one editor to a list of documents, with or without a second view. The editor now suppresses the inherited-property notifications that leaving its logical tree produces (which is all the teardown ever needed to prevent) and leaves the document's element graph intact.
- Two editors (or an editor and a viewer) can bind the same document without fighting over its logical parent: the first host to bind claims it, later hosts attach without claiming, and teardown is symmetric — a non-owning editor letting go of a shared document no longer clears the element references the owning host is still using.