Ability to render inline #527

Open
opened 2026-01-29 14:38:50 +00:00 by claunia · 0 comments
Owner

Originally created by @TheJayMann on GitHub (Apr 19, 2022).

Is there any ability to have a render inline, something similar to the renderInline function available in markdown-it? The idea being, I want to take a small piece of markdown, convert it into html, then insert the html inside, for example, an <h3> element, which should only contain text and inline elements, and should not contain block elements.

As a workaround, I considered the idea of potentially taking the markdown, removing any newlines in the markdown (as a simple precaution, though there will likely never be any newlines in the markdown text), surrounding them in inline custom containers, parsing the markdown into a MarkdownDocument, then rendering the contents of the ContainerInline within the ParagraphBlock. I got as far as parsing the document, and I'm still working out how I would create a renderer which would render as html only the ContainerInline.

Originally created by @TheJayMann on GitHub (Apr 19, 2022). Is there any ability to have a render inline, something similar to the [renderInline](https://markdown-it.github.io/markdown-it/#MarkdownIt.renderInline) function available in markdown-it? The idea being, I want to take a small piece of markdown, convert it into html, then insert the html inside, for example, an `<h3>` element, which should only contain text and inline elements, and should not contain block elements. As a workaround, I considered the idea of potentially taking the markdown, removing any newlines in the markdown (as a simple precaution, though there will likely never be any newlines in the markdown text), surrounding them in inline custom containers, parsing the markdown into a MarkdownDocument, then rendering the contents of the ContainerInline within the ParagraphBlock. I got as far as parsing the document, and I'm still working out how I would create a renderer which would render as html only the ContainerInline.
claunia added the question label 2026-01-29 14:38:50 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#527