Restless.Converters 1.0.4

dotnet add package Restless.Converters --version 1.0.4
NuGet\Install-Package Restless.Converters -Version 1.0.4
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.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Restless.Converters --version 1.0.4
#r "nuget: Restless.Converters, 1.0.4"
#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.4

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

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 85 4/12/2024
1.0.3 83 4/1/2024
1.0.2 75 4/1/2024
1.0.1 93 3/30/2024
1.0.0 88 3/27/2024