I need to create a custom Span
that renders its content like source code. Here's an example of what I am trying to achieve. Let's say we have the following text, where I have annotated the start and end of the custom span using square brackets:
Some text [some\nmulti line\ntext] some more text
The prefix ("Some text") and suffix ("some more text") should be rendered normally, but the custom span should be rendered like a code block:
some
multi line
text
I have been looking at using ReplacementSpan
for this, since i Have previously used that to create various interesting custom spans, but for this case I just can't get it to do what I want.
I somehow need to get my span to render a full block of graphics, occupying the entire width of the container. Is it even possible to do this?