markdig
markdig copied to clipboard
How do I emit a class attribute on table element
First of all, huge thanks for this library - it's really helped me on a recent project.
I'm using the PipeTableExtension for tables, and I'd like the tables to be emitted with a particular class. i.e.
<table class="my-table">
<thead> ...etc
I've had a browse through the code and it looks like there is some kind of baked in support for rendering attributes on HTML elements, but I can't work out how to configure my pipeline to do this. Is it possible?
@markheath I could be wrong, but I believe it is enabled with the following:
var pipeline = new MarkdownPipelineBuilder().UseGenericAttributes().Build();
@markheath You can have a look at the Bootstrap extension on how to add this. I will likely add an extension to perform these kind of changes in a more "generic" way.
Thanks, works perfectly