MarkdownPostProcessor()
Interface: MarkdownPostProcessor()
Section titled “Interface: MarkdownPostProcessor()”Defined in: markdown.ts:53
A post processor receives an element which is a section of the preview.
Post processors can mutate the DOM to render various things, such as mermaid graphs, latex equations, or custom controls.
If your post processor requires lifecycle management, for example, to clear an interval, kill a subprocess, etc when this element is removed from the app, look into MarkdownPostProcessorContext.addChild
MarkdownPostProcessor(
el,ctx):void|Promise<any>
Defined in: markdown.ts:59
The processor function itself.
Parameters
Section titled “Parameters”HTMLElement
Returns
Section titled “Returns”void | Promise<any>
Properties
Section titled “Properties”sortOrder?
Section titled “sortOrder?”
optionalsortOrder?:number
Defined in: markdown.ts:66
An optional integer sort order. Defaults to 0. Lower number runs before higher numbers.