Is there a way to embed a syntax highlighted code block as part of a question?

I’m trying to create a programming quiz, and wanted to be able to add a syntax highlighted code snippet to some of the questions. I could add the content in description, but it would have no syntax highlighting. Is there a way?

Hey there! I’m not sure I understand this query - Can you share a screenshot of what you’re trying to do please?

@Nikhil_CSB You can’t highlight different parts of your code with different coloring, but you can highlight an entire block of code in long text fields that are set to allow rich text formatting.

Here is the markdown formatting you can use:

There is also a toolbar that appears that lets you choose the formatting you want.

Note that there are currently bugs with Airtable’s markdown formatting, because the markdown formatting will NOT respond to bold & italic markdown. (Your only option for bold & italics is to select them from the toolbar or use keyboard shortcuts.)


I want to syntax highlight the code.

Thanks for the reply. I’ve seen code snippets in MarkDown, where we can specify the language and it would get the syntax highlighting. I was looking for something like that. Also, it would be nice to have MD to be used in questions, that’ll let us format the question more accurately.

Lots of content development effort, but this will probably achieve the desire to have a nice looking quiz -

  • Create images for each question using a graphics design tool.
  • Embed the images in a table of questions
  • In the script block display each question as a function of each table record
  • Render the pretty questions using output.markdown()

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.