Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

How to generate inline html using Markdig?

$
0
0

I am trying to write a UI similar to Chat GPT's when the assistant is responding, with a string of characters followed by a circle. Here is the simplified code:

<p style="display: inline;"><span style="display: inline;">         @((MarkupString)Markdig.Markdown.ToHtml(MessageViewModel.Text))</span><span style="display: inline;">         X</span></p>

Markdig generates block elements. Is there a way to configure the behavior so that the "X" in the code above appears on the same line as the html generated by Markdig?

EDIT: here is a visual example of what I am trying to achieve:

enter image description here

As you can see, the X needs to be on the same line as whatever last html element generated by Markdig. It really should not be positionned relatively to the whole block, but inline with the last element, as if it was just another word belonging to the last sentance. I was hoping some configuration could be done in the Markdig pipeline for that ?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>