Restless.Converters
1.0.2
See the version list below for details.
dotnet add package Restless.Converters --version 1.0.2
NuGet\Install-Package Restless.Converters -Version 1.0.2
<PackageReference Include="Restless.Converters" Version="1.0.2" />
paket add Restless.Converters --version 1.0.2
#r "nuget: Restless.Converters, 1.0.2"
// Install Restless.Converters as a Cake Addin #addin nuget:?package=Restless.Converters&version=1.0.2 // Install Restless.Converters as a Cake Tool #tool nuget:?package=Restless.Converters&version=1.0.2
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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0-windows7.0 is compatible. net8.0-windows was computed. |
-
net7.0-windows7.0
- HtmlAgilityPack (>= 1.11.59)
- System.Drawing.Common (>= 8.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.