MarkdownRendererPlugin
OfficeIMO.MarkdownRenderer
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
Accepted by parameters 8
- Method HtmlToMarkdownOptionsExtensions.ApplyPlugin
- Method HtmlToMarkdownOptionsExtensions.HasPlugin
- Method MarkdownReaderOptionsExtensions.ApplyPlugin
- Method MarkdownReaderOptionsExtensions.HasPlugin
- Constructor MarkdownRendererFeaturePack.MarkdownRendererFeaturePack
- Method MarkdownRendererOptions.ApplyPlugin
- Method MarkdownRendererOptions.HasPlugin
- Constructor MarkdownRendererPlugin.MarkdownRendererPlugin
Constructors
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) #Creates a plugin from one or more fenced-block renderer factories.
Parameters
- name string
- rendererFactories System.Collections.Generic.IEnumerable<System.Func<OfficeIMO.MarkdownRenderer.MarkdownFencedCodeBlockRenderer>>
- fenceOptionSchemas System.Collections.Generic.IEnumerable<OfficeIMO.MarkdownRenderer.MarkdownFenceOptionSchema>? = null
- readerDocumentTransforms System.Collections.Generic.IEnumerable<OfficeIMO.Markdown.IMarkdownDocumentTransform>? = null
- htmlDocumentTransforms System.Collections.Generic.IEnumerable<OfficeIMO.Markdown.IMarkdownDocumentTransform>? = null
- htmlElementBlockConverters System.Collections.Generic.IEnumerable<OfficeIMO.Markdown.Html.MarkdownHtmlBlockConverter>? = null
- htmlInlineElementConverters System.Collections.Generic.IEnumerable<OfficeIMO.Markdown.Html.MarkdownHtmlInlineConverter>? = null
- visualElementRoundTripHints System.Collections.Generic.IEnumerable<OfficeIMO.Markdown.MarkdownVisualElementRoundTripHint>? = null
- rendererDocumentTransforms System.Collections.Generic.IEnumerable<OfficeIMO.Markdown.IMarkdownDocumentTransform>? = null
- apply System.Action<OfficeIMO.MarkdownRenderer.MarkdownRendererOptions>? = null
- applyReader System.Action<OfficeIMO.Markdown.MarkdownLoadOptions>? = null
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) #Creates a plugin by composing one or more existing plugins and optional extra schemas.
Parameters
- name string
- plugins System.Collections.Generic.IEnumerable<OfficeIMO.MarkdownRenderer.MarkdownRendererPlugin>
- fenceOptionSchemas System.Collections.Generic.IEnumerable<OfficeIMO.MarkdownRenderer.MarkdownFenceOptionSchema>? = null
- readerDocumentTransforms System.Collections.Generic.IEnumerable<OfficeIMO.Markdown.IMarkdownDocumentTransform>? = null
- htmlDocumentTransforms System.Collections.Generic.IEnumerable<OfficeIMO.Markdown.IMarkdownDocumentTransform>? = null
- htmlElementBlockConverters System.Collections.Generic.IEnumerable<OfficeIMO.Markdown.Html.MarkdownHtmlBlockConverter>? = null
- htmlInlineElementConverters System.Collections.Generic.IEnumerable<OfficeIMO.Markdown.Html.MarkdownHtmlInlineConverter>? = null
- visualElementRoundTripHints System.Collections.Generic.IEnumerable<OfficeIMO.Markdown.MarkdownVisualElementRoundTripHint>? = null
- rendererDocumentTransforms System.Collections.Generic.IEnumerable<OfficeIMO.Markdown.IMarkdownDocumentTransform>? = null
- apply System.Action<OfficeIMO.MarkdownRenderer.MarkdownRendererOptions>? = null
- applyReader System.Action<OfficeIMO.Markdown.MarkdownLoadOptions>? = null
Methods
public void Apply(MarkdownRendererOptions options) #Applies the plugin to the supplied renderer options without duplicating existing language registrations.
Parameters
- options OfficeIMO.MarkdownRenderer.MarkdownRendererOptions
public bool IsApplied(MarkdownRendererOptions options) #Returns true when any of this plugin's fenced block languages are already registered.
Parameters
- options OfficeIMO.MarkdownRenderer.MarkdownRendererOptions
Returns
boolInherited Methods
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 MarkdownLoadOptions.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 HtmlMarkdownExportOptions.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 MarkdownRendererOptions.DocumentTransforms when they want renderer-time AST rewrites aligned with the plugin contract.
public IReadOnlyList<MarkdownHtmlBlockConverter> HtmlElementBlockConverters { get; } #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; } #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; } #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.