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

968 2
Showing results for 
Search instead for 
Did you mean: 
4 - Data Explorer
4 - Data Explorer

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?

5 Replies 5

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:

Markdown syntax for Airtable rich text formatting

Rich text in Airtable is based on on a variation of Markdown, a lightweight and readable syntax for formatting. You can use Markdown in the following areas in Airtable: Base descriptions Long text...

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()