Restless.Converters 1.0.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package Restless.Converters --version 1.0.3                
NuGet\Install-Package Restless.Converters -Version 1.0.3                
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="Restless.Converters" Version="1.0.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Restless.Converters --version 1.0.3                
#r "nuget: Restless.Converters, 1.0.3"                
#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.
// Install Restless.Converters as a Cake Addin
#addin nuget:?package=Restless.Converters&version=1.0.3

// Install Restless.Converters as a Cake Tool
#tool nuget:?package=Restless.Converters&version=1.0.3                

Restless Converters

This project provides an Html to Xaml converter and a custom paste handler that enables you to copy/paste (or drag/drop) information from a web site into the FlowDocument of a Rich Text Box.

Manual Usage

string html = GetHtml();
string xaml = HtmlToXamlConverter.Create().SetHtml(html).Convert();
// do something with the xaml

Automatic Usage

PasteHandler.Register(MyRichTextBox);

When your RichTextBox is registered for automatic usage, you can copy/paste (or drag/drop) from a web site, and the conversion occurs behind the scenes

You can also register a TextBox for automatic usage, but this produces no difference unless you register it with the optional PasteHandlerOptions

PasteHandler.Register(MyTextBox, new PasteHandlerOptions(HtmlPasteAction.ConvertToText));

This enables the TextBox to receive the actual Html, not just the text as with the control's default behavior. Note that if you keep a reference to PasteHandler (the return value of the Register() method), you can change the paste handling behavior at run time.

Product Compatible and additional computed target framework versions.
.NET net7.0-windows7.0 is compatible.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.4 140 4/12/2024
1.0.3 115 4/1/2024
1.0.2 126 4/1/2024
1.0.1 131 3/30/2024
1.0.0 125 3/27/2024