Skip to main content

Text and Markdown cells

Add narrative to your Hex project with Text or Markdown cells.

info

Text and Markdown cells let you add narrative, explanations, and context to your data project.

Text cells provide a WYSIWIG (what you see is what you get) editor that accepts both markdown shortcuts for text formatting as well as UI-driven formatting. Markdown cells provide a familiar UI for Markdown writers, which render as cell output.

tip

Both Markdown and Text cells allow you to mix variables with your text through use of the Jinja templating language, like so: Today we sold {{ n_widgets }} widgets

Check out the section on dynamic text for more tips.

Markdown and Text cell features

tip

We plan to combine these cells into two modes of the same cell. For now, there are slight differences in the functionality of each cell type.

FeatureMarkdown cellText cell
Formatting✅¹
Dynamic text🟡²
User mentions
Image support
Emoji picker
LaTeX formulas

¹Currently, code blocks are not supported in Text cells (i.e. code blocks with three backticks). Code snippets (single backticks) are supported. All other formatting options (headings, bold, italics, hyperlinks, lists, and quotes) are supported in Text cells.

²Jinja support in Text Cells is only for Jinja variables (i.e. code within {{ }}). At present, code blocks (within {% %}), like if statements and for loops are not supported).

Formatting

Headings

To add a heading, use the # symbol followed by the heading text. You can add up to 6 # and the size of the heading will decrease with each one added.

Lists

To create unordered lists in markdown, use either the * or - symbols. To create an ordered list, use the ) or . symbols preceded by a number.

To add a link to a markdown cell, you can wrap your text in square brackets [] followed by the URL wraped in parenthesis ().

Code formatting

You can highlight variables in your text by wrapping your text in backticks (``), or you can use 3 backticks before and after your text to create a code block.

Quotes

To create a blockquote, start a line with a > followed by the quote.

Dynamic text

You can also insert Python variables directly into Markdown cells. Type your text as usual but in place of hard-coding the value you want, wrap the variable name in {{ }} braces to dynamically update your Markdown text. See the screenshot below for an example.

User mentions

info

Markdown cells do not currently support user mentions

Image support

You can render images in Markdown and Text cells by dragging a file from your computer and dropping it in the cell. The image is uploaded as a file and can be referenced again in any other cell.

Emoji picker

To add an emoji to your markdown, start by adding a colon (:) which will promt you to select an emoji from the list of available emojis.

LaTeX formulas

You can use the $$ delimiters in Markdown to insert math expressions in LaTeX style syntax.