Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

MarkdownRendererPlugin

Namespace OfficeIMO.MarkdownRenderer
Assembly OfficeIMO.MarkdownRenderer
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

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

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<HtmlElementBlockConverter> htmlElementBlockConverters = null, IEnumerable<HtmlInlineElementConverter> htmlInlineElementConverters = null, IEnumerable<MarkdownVisualElementRoundTripHint> visualElementRoundTripHints = null, IEnumerable<IMarkdownDocumentTransform> rendererDocumentTransforms = null, Action<MarkdownRendererOptions> apply = null, Action<MarkdownReaderOptions> applyReader = null) #

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

Parameters

arg1 System.String requiredposition: 0
arg2 System.Collections.Generic.IEnumerable{System.Func{OfficeIMO.MarkdownRenderer.MarkdownFencedCodeBlockRenderer}} requiredposition: 1
arg3 System.Collections.Generic.IEnumerable{OfficeIMO.MarkdownRenderer.MarkdownFenceOptionSchema} = null optionalposition: 2
arg4 System.Collections.Generic.IEnumerable{OfficeIMO.Markdown.IMarkdownDocumentTransform} = null optionalposition: 3
arg5 System.Collections.Generic.IEnumerable{OfficeIMO.Markdown.IMarkdownDocumentTransform} = null optionalposition: 4
arg6 System.Collections.Generic.IEnumerable{OfficeIMO.Markdown.Html.HtmlElementBlockConverter} = null optionalposition: 5
arg7 System.Collections.Generic.IEnumerable{OfficeIMO.Markdown.Html.HtmlInlineElementConverter} = null optionalposition: 6
arg8 System.Collections.Generic.IEnumerable{OfficeIMO.Markdown.MarkdownVisualElementRoundTripHint} = null optionalposition: 7
arg9 System.Collections.Generic.IEnumerable{OfficeIMO.Markdown.IMarkdownDocumentTransform} = null optionalposition: 8
arg10 System.Action{OfficeIMO.MarkdownRenderer.MarkdownRendererOptions} = null optionalposition: 9
arg11 System.Action{OfficeIMO.Markdown.MarkdownReaderOptions} = null optionalposition: 10
public MarkdownRendererPlugin(String name, IEnumerable<MarkdownRendererPlugin> plugins, IEnumerable<MarkdownFenceOptionSchema> fenceOptionSchemas = null, IEnumerable<IMarkdownDocumentTransform> readerDocumentTransforms = null, IEnumerable<IMarkdownDocumentTransform> htmlDocumentTransforms = null, IEnumerable<HtmlElementBlockConverter> htmlElementBlockConverters = null, IEnumerable<HtmlInlineElementConverter> htmlInlineElementConverters = null, IEnumerable<MarkdownVisualElementRoundTripHint> visualElementRoundTripHints = null, IEnumerable<IMarkdownDocumentTransform> rendererDocumentTransforms = null, Action<MarkdownRendererOptions> apply = null, Action<MarkdownReaderOptions> applyReader = null) #

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

Parameters

arg1 System.String requiredposition: 0
arg2 System.Collections.Generic.IEnumerable{OfficeIMO.MarkdownRenderer.MarkdownRendererPlugin} requiredposition: 1
arg3 System.Collections.Generic.IEnumerable{OfficeIMO.MarkdownRenderer.MarkdownFenceOptionSchema} = null optionalposition: 2
arg4 System.Collections.Generic.IEnumerable{OfficeIMO.Markdown.IMarkdownDocumentTransform} = null optionalposition: 3
arg5 System.Collections.Generic.IEnumerable{OfficeIMO.Markdown.IMarkdownDocumentTransform} = null optionalposition: 4
arg6 System.Collections.Generic.IEnumerable{OfficeIMO.Markdown.Html.HtmlElementBlockConverter} = null optionalposition: 5
arg7 System.Collections.Generic.IEnumerable{OfficeIMO.Markdown.Html.HtmlInlineElementConverter} = null optionalposition: 6
arg8 System.Collections.Generic.IEnumerable{OfficeIMO.Markdown.MarkdownVisualElementRoundTripHint} = null optionalposition: 7
arg9 System.Collections.Generic.IEnumerable{OfficeIMO.Markdown.IMarkdownDocumentTransform} = null optionalposition: 8
arg10 System.Action{OfficeIMO.MarkdownRenderer.MarkdownRendererOptions} = null optionalposition: 9
arg11 System.Action{OfficeIMO.Markdown.MarkdownReaderOptions} = null optionalposition: 10

Methods

public Void Apply(MarkdownRendererOptions options) #
Returns: Void

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

Parameters

options OfficeIMO.MarkdownRenderer.MarkdownRendererOptions requiredposition: 0
public Boolean IsApplied(MarkdownRendererOptions options) #
Returns: Boolean

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

Parameters

options OfficeIMO.MarkdownRenderer.MarkdownRendererOptions requiredposition: 0

Properties

public String Name { get; } #

Friendly plugin name used for diagnostics and documentation.

public String Id { get; } #

Stable plugin identifier used for idempotence and diagnostics.

public IReadOnlyList<String> Languages { get; } #

All fenced block languages covered by this plugin.

public IReadOnlyList<MarkdownFenceOptionSchema> FenceOptionSchemas { get; } #

Fence option schemas contributed by this plugin.

public IReadOnlyList<IMarkdownDocumentTransform> ReaderDocumentTransforms { get; } #

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

public IReadOnlyList<IMarkdownDocumentTransform> HtmlDocumentTransforms { get; } #

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

public IReadOnlyList<IMarkdownDocumentTransform> RendererDocumentTransforms { get; } #

Renderer-side document transforms contributed by this plugin. Hosts can register these on DocumentTransforms when they want renderer-time AST rewrites aligned with the plugin contract.

public IReadOnlyList<HtmlElementBlockConverter> HtmlElementBlockConverters { get; } #

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

public IReadOnlyList<HtmlInlineElementConverter> HtmlInlineElementConverters { get; } #

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

public IReadOnlyList<MarkdownVisualElementRoundTripHint> VisualElementRoundTripHints { get; } #

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