Inline `code` blocks in Rich Text fields

Hey everyone!

Is there a way to add inline <code></code> blocks in a Rich Text fields? The preformatted text option affects the whole paragraph. I just want certain words/phrases to be wrapped inside code blocks, similar to how bold and italics work now.

This feature will be very useful for technical writing. :pray:


Hello @ramkumarshankar, welcome to the community forum!

You can totally do this by using Labels to customize the Rich Text fields.

You can create a codespan tag than you can later select for a small piece of text. This label will be highlighted in the document of the repo. Then later you’ll just need to add the necessary CSS configurations on your code to either render the codespan as a code snippet or as pure code.

Hi @Pau, thanks for that. My apologies - I came across that support article but I didn’t quite follow up on it. I mixed it up with slice labels, which I now realise is something quite different. :confused:

Using labels in the text field works perfectly, thank you!

Linking previous thread where we discuss how you can add extra formatting options, like code highlighting, using rich text labels here:

Closing this thread.

1 Like