Design

Notion Trick: Center Text Inside A Cell Using Regex

Screen Shot 2020-09-09 at 2.16.55 PM.png

⚒️ Align Formula Text

Here’s a little trick I use to arrange alignment of text inside a cell. Using regex (regular expression), one can move text inside a Notion Formula with the “Wrap Cells” toggle on. I find this particularly useful for UID implementation, dates and other text values that appear in a consistent format.

The Different Styles

“\n” - new line

“\t” - tab text

Screen Shot 2020-09-11 at 8.25.03 PM.png

Break formula into separate lines

"foo isn't\nbar"

Tab Text To The Right

"\tThis is tabbed"

Break Formula InTo A Stair Arrangement

"This is" + "\n\tstacked" + "\n\t\tand tabbed"

Center Text In Cell

"\n\t This is center of cell"

This trick is sensitive to cell-width.

ezgif.com-gif-maker.gif

Use-Case: ID Setup In My Notes Database

format(timestamp(prop("Created Time"))) + "\n\t" + formatDate(prop("Created Time"), "MMMM YYYY")

Screen Shot 2020-09-11 at 3.36.42 PM.png