You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The underlying parser Markdig supports extensions. Some of these come bundled with that package, such as Pipe Tables and Diagrams. Others can be added with extra code.
We can ship with a few UseFoo properties that allow to configure the built-in extensions that end up both in the MarkdownPipeline and the Renderer. This makes it super easy to control which Markdown extensions get enabled without having to mess around with a MarkdownPipeline or any C# code.
With this approach, we can allow users to add arbitrary extensions on top of the control in a very simple and declarative manner. A quick glance at the XAML tells you all the built-in and custom extensions currently being used.
We should also try to hide away the implementation of the rendering logic. Right now it's all based on programmatically adding elements to a RichTextBlock, but some day we might change the rendering target to something else or change the rendering code. If we were to expose the ability to directly control the rendering, we should define a set of public APIs that can stay consistent going forward.
Proposal: Extensions
The underlying parser
Markdig
supports extensions. Some of these come bundled with that package, such as Pipe Tables and Diagrams. Others can be added with extra code.Simple properties for built-in extensions
We can ship with a few
UseFoo
properties that allow to configure the built-in extensions that end up both in the MarkdownPipeline and the Renderer. This makes it super easy to control which Markdown extensions get enabled without having to mess around with a MarkdownPipeline or any C# code.Custom extensions
Declaration in XAML:
And C#, implementing a new interface we ship
IElement
:With this approach, we can allow users to add arbitrary extensions on top of the control in a very simple and declarative manner. A quick glance at the XAML tells you all the built-in and custom extensions currently being used.
Originally posted by @jcoc611-microsoft in #536 (comment)
The text was updated successfully, but these errors were encountered: