You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

Restless.Converters

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Restless.Converters

Provides html to xaml conversion and custom paste handling that enables you to copy/paste (or drag/drop) information from a web site into a Rich Text Box.

1.0.4
Source
nugetNuGet
Version published
Maintainers
1
Created
Source

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.

Keywords

converters

FAQs

Package last updated on 12 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.