{"id":21142440,"url":"https://github.com/victor-david/restless-converters","last_synced_at":"2026-04-24T18:32:56.944Z","repository":{"id":230112518,"uuid":"777499135","full_name":"victor-david/restless-converters","owner":"victor-david","description":"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.","archived":false,"fork":false,"pushed_at":"2024-04-12T15:47:41.000Z","size":90,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-24T16:09:04.328Z","etag":null,"topics":["converter","flowdocument","html","htmltoxaml","wpf","xaml"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/victor-david.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-26T00:46:48.000Z","updated_at":"2024-03-30T16:38:46.000Z","dependencies_parsed_at":"2024-03-27T23:15:31.182Z","dependency_job_id":"cd8f3ab4-cf32-4723-8845-a11df30e3db0","html_url":"https://github.com/victor-david/restless-converters","commit_stats":null,"previous_names":["victor-david/restless-converters"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victor-david%2Frestless-converters","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victor-david%2Frestless-converters/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victor-david%2Frestless-converters/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victor-david%2Frestless-converters/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/victor-david","download_url":"https://codeload.github.com/victor-david/restless-converters/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243581059,"owners_count":20314167,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["converter","flowdocument","html","htmltoxaml","wpf","xaml"],"created_at":"2024-11-20T07:53:31.326Z","updated_at":"2025-12-28T18:32:53.497Z","avatar_url":"https://github.com/victor-david.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Restless Converters\n\n[![Nuget](https://img.shields.io/nuget/v/Restless.Converters.svg?style=flat-square)](https://www.nuget.org/packages/Restless.Converters/) \n\nThis 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 \ninto the FlowDocument of a Rich Text Box.\n\nThe Html to Xaml converter does not attempt to completely replicate the incoming html. Instead, it enables you to specify (for instance) the appearance of an incoming **H1** element, \nrather than copying the style used on the web site. Other tags may be similarly customized.\n\n## Usage\n\n```c#\nstring html = GetHtml();\nstring xaml = HtmlToXamlConverter.Create().SetHtml(html).Convert();\n```\n\nYou can also supply an optional **ConverterOptions** object\n\n```c#\nstring html = GetHtml();\nstring xaml = HtmlToXamlConverter.Create(new ConverterOptions()\n{\n    AddDefaultBlockConfigs = false,\n    IsOutputIndented = true\n}) .SetHtml(html).Convert();\n```\n\n## Converter Options\nConverter options affect how the xaml is generated.\n\n| Property | Type | Default | Description |\n| --- | --- | --- | --- |\n| IsTopLevelFlowDocument | bool | **false** | When this property is true, the top level element of the output is a flow document. When false, the top level element is a section. If you're going to place the output into a RichTextBox, this property should be left at its default.|\n| SectionConfig | BlockConfig | **BlockConfig** | Provides access to the configuration that is applied to Xaml Section nodes |\n| AddDefaultBlockConfigs | bool | **true** | Determines whether default block configurations are applied. Defaults include settings for **H1**, **H2**, **UL**, **OL**, and others. You can change any defaults before conversion or supply your own, or both. |\n| ProcessUnknown | bool | **false** | Determines whether unknown nodes are processed. When an unknown node is processed, it appears in the xaml with its name and inner text. Mostly a debugging aide. |\n| SetPreserve | bool | **false** | Determines whether the xaml output has **xml:space preserve** added. |\n| IsOutputIndented | bool | **false** | Determines whether xaml output is indented. When **false**, xaml is all on one long line. When **true**, the xaml is broken up into lines, indented, and easier to read. |\n\n## Paste Handler\nPaste handler provides a way to register controls for automatic custom paste handling. \n\n```c#\nPasteHandler.Register(MyRichTextBox);\n```\n\nWhen your RichTextBox is registered for automatic usage, you can\ncopy/paste (or drag/drop) from a web site, and the conversion occurs\nbehind the scenes\n\nYou can also register a TextBox for automatic usage, but this produces no difference\nunless you register it with the optional **PasteHandlerOptions**\n\n```c#\nPasteHandler.Register(MyTextBox, new PasteHandlerOptions(HtmlPasteAction.ConvertToText));\n```\n\nThis enables the TextBox to receive the actual Html, not just the text as with the control's\ndefault behavior. Note that if you keep a reference to **PasteHandler** (the return value\nof the **Register()** method), you can change the paste handling behavior at run time.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictor-david%2Frestless-converters","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvictor-david%2Frestless-converters","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictor-david%2Frestless-converters/lists"}