Graphene.ReverseMarkdown 1.26.8.18

dotnet add package Graphene.ReverseMarkdown --version 1.26.8.18
                    
NuGet\Install-Package Graphene.ReverseMarkdown -Version 1.26.8.18
                    
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="Graphene.ReverseMarkdown" Version="1.26.8.18" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Graphene.ReverseMarkdown" Version="1.26.8.18" />
                    
Directory.Packages.props
<PackageReference Include="Graphene.ReverseMarkdown" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Graphene.ReverseMarkdown --version 1.26.8.18
                    
#r "nuget: Graphene.ReverseMarkdown, 1.26.8.18"
                    
#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.
#:package Graphene.ReverseMarkdown@1.26.8.18
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Graphene.ReverseMarkdown&version=1.26.8.18
                    
Install as a Cake Addin
#tool nuget:?package=Graphene.ReverseMarkdown&version=1.26.8.18
                    
Install as a Cake Tool

DocumentCreator / ReverseMarkdown

Overview

  • DocumentCreator is a small toolset and library for converting HTML to Markdown and for assembling documents.
  • This repository includes a forked and extended version of the ReverseMarkdown library used by the project, adapted to emit machine-readable descriptions of interactive HTML elements for LLMs and automation.

Interactive JSON wrapper for LLMs

  • When enabled, the HTML→Markdown conversion can emit JSON descriptions of interactive elements using a compact wrapper format so LLMs (or other consumers) can detect UI elements in the Markdown stream.
  • Wrapper format: <<INTERACTIVE::tag::JSON>>
    • tag is the original HTML tag name (for example button, input, select, textarea, a, option, details, summary, dialog, menu, menuitem).
    • JSON is a compact JSON object describing the element, its attributes and its interaction-relevant state.

How to enable

JSON payload schema (summary)

  • schemaVersion (int): version of the payload schema.
  • id (string): deterministic id or generated id for the element (may be based on id attribute or generated guid).
  • type (string): HTML tag name.
  • attributes (object): map of element attributes (class, id, name, type, placeholder, value, href, role, aria-* etc.).
  • text (string): visible text content (if applicable).
  • state (object): interaction-relevant properties, e.g.:
    • enabled (bool) whether the element is enabled
    • checked (bool) for checkboxes/radios
    • selected (bool) for options
    • open (bool) for details/dialog
  • options (array): for select elements an array of options with { value, text, selected }.
  • path (string): approximate XPath or DOM path to help locate element in original document.
  • timestamp (string): ISO-8601 when the descriptor was generated.

Notes for LLMs / consumers

Design/Implementation notes

  • The converter uses an LLM-friendly, compact JSON representation to make it easy for downstream LLMs to extract UI structure and to reason about user interactions (e.g., which buttons exist, which inputs are filled, which options are selected).
  • Invisible or hidden elements are skipped (attributes like hidden, aria-hidden, or style="display:none"), unless you change the visibility heuristics in ReverseMarkdown/Converters/InteractiveJsonConverter.cs.

Examples

  • C# usage:
var converter = new ReverseMarkdown.Converter();
string md = converter.Convert(htmlString, includeInteractive: true);
// md now contains regular markdown plus wrapper lines like:
// <<<INTERACTIVE::input::{"schemaVersion":1,...}>>>
  • Regex to detect wrappers (simple):
/<<<INTERACTIVE::([a-zA-Z0-9_-]+)::(.*?)>>>/s
  • LLM hint: treat each wrapper as a separate structured observation. For user-interaction planning, map type+state into possible actions (click, type, select, open, etc.). The repository intentionally omits an actions array — an LLM can infer possible actions from the tag and state.

Security & privacy

  • Because input values (including type="password") can be included in the descriptors, do not send converted output containing sensitive values to external services without scrubbing or user consent.

Build & test

  • To build the solution:
dotnet build DocumentCreator.sln
  • To run quick checks, create a small harness that calls Converter.Convert(html, true) and prints output to verify wrappers are emitted.

Contributing

  • If you change the wrapper schema, increment schemaVersion and document the change here so downstream LLM prompts can be updated.

Files of interest

License

  • See project root for license and original ReverseMarkdown project licensing notes.
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Graphene.ReverseMarkdown:

Package Downloads
Graphene.AIOrchestrator

Agent orchestration engine (chat pipeline, tools, documents, email) backing AgentBridge.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.26.8.18 57 8/18/2026
1.26.8.12 333 8/12/2026
1.26.8.9 168 8/9/2026