# MarkdownRendererPlugin

Reusable fenced-block renderer plugin that can register one or more renderer extensions on top of Markdown and the host HTML shell.

Class 

`OfficeIMO.MarkdownRenderer`

**Namespace**

`OfficeIMO.MarkdownRenderer`

**Assembly**

`OfficeIMO.MarkdownRenderer`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[MarkdownRendererPlugin.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.MarkdownRenderer/MarkdownRendererPlugin.cs#L25)

**Modifiers**

sealed

Reusable fenced-block renderer plugin that can register one or more renderer extensions on top of Markdown and the host HTML shell.

## Inheritance

- object
- MarkdownRendererPlugin

## Usage

Explore 13 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 5

- Property [MarkdownRendererFeaturePack.Plugins](/api/markdown-renderer/officeimo-markdownrenderer-markdownrendererfeaturepack/#property-plugins)
- Property [MarkdownRendererIntelligenceXAdapter.Plugin](/api/markdown-renderer/officeimo-markdownrenderer-markdownrendererintelligencexadapter/#property-plugin)
- Property [MarkdownRendererPlugins.GenericVisuals](/api/markdown-renderer/officeimo-markdownrenderer-markdownrendererplugins/#property-genericvisuals)
- Property [MarkdownRendererPlugins.IntelligenceXTranscriptVisuals](/api/markdown-renderer/officeimo-markdownrenderer-markdownrendererplugins/#property-intelligencextranscriptvisuals)
- Property [MarkdownRendererPlugins.IntelligenceXVisuals](/api/markdown-renderer/officeimo-markdownrenderer-markdownrendererplugins/#property-intelligencexvisuals)

### Accepted by parameters 8

- Method [HtmlToMarkdownOptionsExtensions.ApplyPlugin](/api/markdown-renderer/officeimo-markdownrenderer-htmltomarkdownoptionsextensions/#method-applyplugin-officeimo-markdown-html-htmlmarkdownexportoptions-officeimo-markdownrenderer-markdownrendererplugin) parameter `plugin`
- Method [HtmlToMarkdownOptionsExtensions.HasPlugin](/api/markdown-renderer/officeimo-markdownrenderer-htmltomarkdownoptionsextensions/#method-hasplugin-officeimo-markdown-html-htmlmarkdownexportoptions-officeimo-markdownrenderer-markdownrendererplugin) parameter `plugin`
- Method [MarkdownReaderOptionsExtensions.ApplyPlugin](/api/markdown-renderer/officeimo-markdownrenderer-markdownreaderoptionsextensions/#method-applyplugin-officeimo-markdown-markdownloadoptions-officeimo-markdownrenderer-markdownrendererplugin) parameter `plugin`
- Method [MarkdownReaderOptionsExtensions.HasPlugin](/api/markdown-renderer/officeimo-markdownrenderer-markdownreaderoptionsextensions/#method-hasplugin-officeimo-markdown-markdownloadoptions-officeimo-markdownrenderer-markdownrendererplugin) parameter `plugin`
- Constructor [MarkdownRendererFeaturePack.MarkdownRendererFeaturePack](/api/markdown-renderer/officeimo-markdownrenderer-markdownrendererfeaturepack/#constructor-ctor-string-string-collections-generic-ienumerable-officeimo-markdownrenderer-markdownrendererplugin-action-officeimo-markdownrenderer-markdownrendereroptions-action-officeimo-markdown-markdownloadoptions) parameter `plugins`
- Method [MarkdownRendererOptions.ApplyPlugin](/api/markdown-renderer/officeimo-markdownrenderer-markdownrendereroptions/#method-applyplugin-officeimo-markdownrenderer-markdownrendererplugin) parameter `plugin`
- Method [MarkdownRendererOptions.HasPlugin](/api/markdown-renderer/officeimo-markdownrenderer-markdownrendereroptions/#method-hasplugin-officeimo-markdownrenderer-markdownrendererplugin) parameter `plugin`
- Constructor [MarkdownRendererPlugin.MarkdownRendererPlugin](/api/markdown-renderer/officeimo-markdownrenderer-markdownrendererplugin/#constructor-ctor-string-collections-generic-ienumerable-officeimo-markdownrenderer-markdownrendererplugin-collections-generic-ienumerable-officeimo-markdownrenderer-markdownfenceoptionschema-collections-generic-ienumerable-officeimo-markdown-imarkdowndocumenttransform-collections-generic-ienumerable-officeimo-markdown-imarkdowndocumenttransform-collections-generic-ienumerable-officeimo-markdown-html-markdownhtmlblockconverter-collections-generic-ienumerable-officeimo-markdown-html-markdownhtmlinlineconverter-collections-generic-ienumerable-officeimo-markdown-markdownvisualelementroundtriphint-collections-generic-ienumerable-officeimo-markdown-imarkdowndocumenttransform-action-officeimo-markdownrenderer-markdownrendereroptions-action-officeimo-markdown-markdownloadoptions) parameter `plugins`

Filter members 

Show inherited

## Constructors

MarkdownRendererPlugin 2 overloads

`public MarkdownRendererPlugin(string name, IEnumerable<Func<MarkdownFencedCodeBlockRenderer>> rendererFactories, IEnumerable<MarkdownFenceOptionSchema>? fenceOptionSchemas = null, IEnumerable<IMarkdownDocumentTransform>? readerDocumentTransforms = null, IEnumerable<IMarkdownDocumentTransform>? htmlDocumentTransforms = null, IEnumerable<MarkdownHtmlBlockConverter>? htmlElementBlockConverters = null, IEnumerable<MarkdownHtmlInlineConverter>? htmlInlineElementConverters = null, IEnumerable<MarkdownVisualElementRoundTripHint>? visualElementRoundTripHints = null, IEnumerable<IMarkdownDocumentTransform>? rendererDocumentTransforms = null, Action<MarkdownRendererOptions>? apply = null, Action<MarkdownLoadOptions>? applyReader = null)` [#](#member-d24a0c9d07b9d91652187471)

[MarkdownRendererPlugin.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.MarkdownRenderer/MarkdownRendererPlugin.cs#L25)

Creates a plugin from one or more fenced-block renderer factories.

Parameters

**name string required**

**rendererFactories System.Collections.Generic.IEnumerable<System.Func<OfficeIMO.MarkdownRenderer.MarkdownFencedCodeBlockRenderer>> required**

**fenceOptionSchemas System.Collections.Generic.IEnumerable<OfficeIMO.MarkdownRenderer.MarkdownFenceOptionSchema>? = null optional**

**readerDocumentTransforms System.Collections.Generic.IEnumerable<OfficeIMO.Markdown.IMarkdownDocumentTransform>? = null optional**

**htmlDocumentTransforms System.Collections.Generic.IEnumerable<OfficeIMO.Markdown.IMarkdownDocumentTransform>? = null optional**

**htmlElementBlockConverters System.Collections.Generic.IEnumerable<OfficeIMO.Markdown.Html.MarkdownHtmlBlockConverter>? = null optional**

**htmlInlineElementConverters System.Collections.Generic.IEnumerable<OfficeIMO.Markdown.Html.MarkdownHtmlInlineConverter>? = null optional**

**visualElementRoundTripHints System.Collections.Generic.IEnumerable<OfficeIMO.Markdown.MarkdownVisualElementRoundTripHint>? = null optional**

**rendererDocumentTransforms System.Collections.Generic.IEnumerable<OfficeIMO.Markdown.IMarkdownDocumentTransform>? = null optional**

**apply System.Action<OfficeIMO.MarkdownRenderer.MarkdownRendererOptions>? = null optional**

**applyReader System.Action<OfficeIMO.Markdown.MarkdownLoadOptions>? = null optional**

`public MarkdownRendererPlugin(string name, IEnumerable<MarkdownRendererPlugin> plugins, IEnumerable<MarkdownFenceOptionSchema>? fenceOptionSchemas = null, IEnumerable<IMarkdownDocumentTransform>? readerDocumentTransforms = null, IEnumerable<IMarkdownDocumentTransform>? htmlDocumentTransforms = null, IEnumerable<MarkdownHtmlBlockConverter>? htmlElementBlockConverters = null, IEnumerable<MarkdownHtmlInlineConverter>? htmlInlineElementConverters = null, IEnumerable<MarkdownVisualElementRoundTripHint>? visualElementRoundTripHints = null, IEnumerable<IMarkdownDocumentTransform>? rendererDocumentTransforms = null, Action<MarkdownRendererOptions>? apply = null, Action<MarkdownLoadOptions>? applyReader = null)` [#](#member-cc60f355e744a071b0a58c2f)

[MarkdownRendererPlugin.cs:72](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.MarkdownRenderer/MarkdownRendererPlugin.cs#L72)

Creates a plugin by composing one or more existing plugins and optional extra schemas.

Parameters

**name string required**

**plugins System.Collections.Generic.IEnumerable<OfficeIMO.MarkdownRenderer.MarkdownRendererPlugin> required**

**fenceOptionSchemas System.Collections.Generic.IEnumerable<OfficeIMO.MarkdownRenderer.MarkdownFenceOptionSchema>? = null optional**

**readerDocumentTransforms System.Collections.Generic.IEnumerable<OfficeIMO.Markdown.IMarkdownDocumentTransform>? = null optional**

**htmlDocumentTransforms System.Collections.Generic.IEnumerable<OfficeIMO.Markdown.IMarkdownDocumentTransform>? = null optional**

**htmlElementBlockConverters System.Collections.Generic.IEnumerable<OfficeIMO.Markdown.Html.MarkdownHtmlBlockConverter>? = null optional**

**htmlInlineElementConverters System.Collections.Generic.IEnumerable<OfficeIMO.Markdown.Html.MarkdownHtmlInlineConverter>? = null optional**

**visualElementRoundTripHints System.Collections.Generic.IEnumerable<OfficeIMO.Markdown.MarkdownVisualElementRoundTripHint>? = null optional**

**rendererDocumentTransforms System.Collections.Generic.IEnumerable<OfficeIMO.Markdown.IMarkdownDocumentTransform>? = null optional**

**apply System.Action<OfficeIMO.MarkdownRenderer.MarkdownRendererOptions>? = null optional**

**applyReader System.Action<OfficeIMO.Markdown.MarkdownLoadOptions>? = null optional**

## Methods

`public void Apply(MarkdownRendererOptions options)` [#](#method-apply-officeimo-markdownrenderer-markdownrendereroptions)

[MarkdownRendererPlugin.cs:243](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.MarkdownRenderer/MarkdownRendererPlugin.cs#L243)

Applies the plugin to the supplied renderer options without duplicating existing language registrations.

Parameters

**options OfficeIMO.MarkdownRenderer.MarkdownRendererOptions required**

`public bool IsApplied(MarkdownRendererOptions options)` [#](#method-isapplied-officeimo-markdownrenderer-markdownrendereroptions)

[MarkdownRendererPlugin.cs:276](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.MarkdownRenderer/MarkdownRendererPlugin.cs#L276)

Returns true when any of this plugin's fenced block languages are already registered.

Parameters

**options OfficeIMO.MarkdownRenderer.MarkdownRendererOptions required**

Returns

`bool`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public string Name { get; }` [#](#property-name)

[MarkdownRendererPlugin.cs:171](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.MarkdownRenderer/MarkdownRendererPlugin.cs#L171)

Friendly plugin name used for diagnostics and documentation.

`public string Id { get; }` [#](#property-id)

[MarkdownRendererPlugin.cs:176](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.MarkdownRenderer/MarkdownRendererPlugin.cs#L176)

Stable plugin identifier used for idempotence and diagnostics.

`public IReadOnlyList<string> Languages { get; }` [#](#property-languages)

[MarkdownRendererPlugin.cs:183](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.MarkdownRenderer/MarkdownRendererPlugin.cs#L183)

All fenced block languages covered by this plugin.

`public IReadOnlyList<MarkdownFenceOptionSchema> FenceOptionSchemas { get; }` [#](#property-fenceoptionschemas)

[MarkdownRendererPlugin.cs:195](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.MarkdownRenderer/MarkdownRendererPlugin.cs#L195)

Fence option schemas contributed by this plugin.

`public IReadOnlyList<IMarkdownDocumentTransform> ReaderDocumentTransforms { get; }` [#](#property-readerdocumenttransforms)

[MarkdownRendererPlugin.cs:202](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.MarkdownRenderer/MarkdownRendererPlugin.cs#L202)

Reader-side document transforms contributed by this plugin. Hosts can register these on MarkdownLoadOptions.DocumentTransforms when they want source parsing aligned with the plugin contract.

`public IReadOnlyList<IMarkdownDocumentTransform> HtmlDocumentTransforms { get; }` [#](#property-htmldocumenttransforms)

[MarkdownRendererPlugin.cs:209](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.MarkdownRenderer/MarkdownRendererPlugin.cs#L209)

HTML-to-markdown document transforms contributed by this plugin. Hosts can register these on HtmlMarkdownExportOptions.DocumentTransforms when they want HTML ingestion aligned with the plugin contract.

`public IReadOnlyList<IMarkdownDocumentTransform> RendererDocumentTransforms { get; }` [#](#property-rendererdocumenttransforms)

[MarkdownRendererPlugin.cs:216](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.MarkdownRenderer/MarkdownRendererPlugin.cs#L216)

Renderer-side document transforms contributed by this plugin. Hosts can register these on [MarkdownRendererOptions.DocumentTransforms](/api/markdown-renderer/officeimo-markdownrenderer-markdownrendereroptions/) when they want renderer-time AST rewrites aligned with the plugin contract.

`public IReadOnlyList<MarkdownHtmlBlockConverter> HtmlElementBlockConverters { get; }` [#](#property-htmlelementblockconverters)

[MarkdownRendererPlugin.cs:223](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.MarkdownRenderer/MarkdownRendererPlugin.cs#L223)

HTML-to-markdown custom element block converters contributed by this plugin. Hosts can register these on HtmlMarkdownExportOptions.ElementBlockConverters when they want HTML element decoding aligned with the plugin contract.

`public IReadOnlyList<MarkdownHtmlInlineConverter> HtmlInlineElementConverters { get; }` [#](#property-htmlinlineelementconverters)

[MarkdownRendererPlugin.cs:230](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.MarkdownRenderer/MarkdownRendererPlugin.cs#L230)

HTML-to-markdown custom inline element converters contributed by this plugin. Hosts can register these on HtmlMarkdownExportOptions.InlineElementConverters when they want inline HTML decoding aligned with the plugin contract.

`public IReadOnlyList<MarkdownVisualElementRoundTripHint> VisualElementRoundTripHints { get; }` [#](#property-visualelementroundtriphints)

[MarkdownRendererPlugin.cs:237](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.MarkdownRenderer/MarkdownRendererPlugin.cs#L237)

Shared visual-host HTML round-trip hints contributed by this plugin. Hosts can register these on HtmlMarkdownExportOptions.VisualElementRoundTripHints when they want HTML-to-AST recovery aligned with the plugin contract.

<!-- PowerForge markdown artifact sha256:AF94C3114E6644F34C20ED520D6307CF6614CDD96790154FE4D420FC6F0A761F -->
