mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-08 21:37:02 +00:00
Add parent container for HTML elements #213
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @konrad147 on GitHub (Jun 26, 2018).
Hello,
I have a following problem: I need to wrap every
<table>element into a<div>during rendering. What would be the best approach to solve it? I thought about a custom extension but not sure whether I can change order of elements there. Another option would be to directly modifyMarkdownDocumentisn't it?I know I could use
CustomContainersbut then client would have to remember to wrap each table into them and I want to avoid.I'll be thankful for suggestions.
@xoofx commented on GitHub (Jun 26, 2018):
You probably have two options:
HtmlTableRenderer, replace the previousHtmlTableRenderersetup in theHtmlRenderer, override the methodHtmlTableRenderer.Write(calling the base and wrapping it with a div)If it is just a rendering issue, maybe option 1. is the easiest (Haven't checked the details, so it might not work in the end)
@konrad147 commented on GitHub (Jun 26, 2018):
Thanks!