SHFB icon indicating copy to clipboard operation
SHFB copied to clipboard

Can we add the html content like tables, bold, etc in the syntax code block?

Open gowthamguptha opened this issue 6 years ago • 1 comments

Hi Team,

I am using a custom presentation style to display the content in JSON format.

But I have to add the syntax of request and response in the different block for readability and i need to apply some styles like bold, italic, place whole content inside the table etc.,

Could you suggest how can I achieve this in my custom presentation?

I am trying WriteNormalMethodSyntax to append HTML tags but those are showing as a string in UI.

gowthamguptha avatar Dec 24 '19 06:12 gowthamguptha

The syntax components write out the various syntax parts in spans with a style class that is defined by the presentation style (keyword, parameter, identifier, literal, etc.). Things like bold and italic can be accomplished by using the WriteStringWithStyle method and adding the style to your stylesheet to render it accordingly. Complex structures like tables just aren't supported since typically it's just writing out a method declaration. You may need to use a separate build component to locate such content elements and post-process them after the syntax component has ran.

EWSoftware avatar Dec 24 '19 17:12 EWSoftware