API Reference
MarkdownRendererPlugin
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.
Returned or exposed by
Accepted by parameters
- 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<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
- arg2 System.Collections.Generic.IEnumerable{System.Func{OfficeIMO.MarkdownRenderer.MarkdownFencedCodeBlockRenderer}}
- arg3 System.Collections.Generic.IEnumerable{OfficeIMO.MarkdownRenderer.MarkdownFenceOptionSchema} = null
- arg4 System.Collections.Generic.IEnumerable{OfficeIMO.Markdown.IMarkdownDocumentTransform} = null
- arg5 System.Collections.Generic.IEnumerable{OfficeIMO.Markdown.IMarkdownDocumentTransform} = null
- arg6 System.Collections.Generic.IEnumerable{OfficeIMO.Markdown.Html.HtmlElementBlockConverter} = null
- arg7 System.Collections.Generic.IEnumerable{OfficeIMO.Markdown.Html.HtmlInlineElementConverter} = null
- arg8 System.Collections.Generic.IEnumerable{OfficeIMO.Markdown.MarkdownVisualElementRoundTripHint} = null
- arg9 System.Collections.Generic.IEnumerable{OfficeIMO.Markdown.IMarkdownDocumentTransform} = null
- arg10 System.Action{OfficeIMO.MarkdownRenderer.MarkdownRendererOptions} = null
- arg11 System.Action{OfficeIMO.Markdown.MarkdownReaderOptions} = null
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
- arg2 System.Collections.Generic.IEnumerable{OfficeIMO.MarkdownRenderer.MarkdownRendererPlugin}
- arg3 System.Collections.Generic.IEnumerable{OfficeIMO.MarkdownRenderer.MarkdownFenceOptionSchema} = null
- arg4 System.Collections.Generic.IEnumerable{OfficeIMO.Markdown.IMarkdownDocumentTransform} = null
- arg5 System.Collections.Generic.IEnumerable{OfficeIMO.Markdown.IMarkdownDocumentTransform} = null
- arg6 System.Collections.Generic.IEnumerable{OfficeIMO.Markdown.Html.HtmlElementBlockConverter} = null
- arg7 System.Collections.Generic.IEnumerable{OfficeIMO.Markdown.Html.HtmlInlineElementConverter} = null
- arg8 System.Collections.Generic.IEnumerable{OfficeIMO.Markdown.MarkdownVisualElementRoundTripHint} = null
- arg9 System.Collections.Generic.IEnumerable{OfficeIMO.Markdown.IMarkdownDocumentTransform} = null
- arg10 System.Action{OfficeIMO.MarkdownRenderer.MarkdownRendererOptions} = null
- arg11 System.Action{OfficeIMO.Markdown.MarkdownReaderOptions} = null
Methods
public Void Apply(MarkdownRendererOptions options) #VoidApplies the plugin to the supplied renderer options without duplicating existing language registrations.
Parameters
- options OfficeIMO.MarkdownRenderer.MarkdownRendererOptions
public Boolean IsApplied(MarkdownRendererOptions options) #BooleanReturns true when any of this plugin's fenced block languages are already registered.
Parameters
- options OfficeIMO.MarkdownRenderer.MarkdownRendererOptions
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
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.