Wrap text as code block

Wraps the input in three backticks on either side (which displays as a "code block" in Markdown-supported applications).

Scripting Actions

shortcuts-action-icon-text.webp
Text
Passes the specified text to the next action.
shortcuts-action-icon-copy-to-clipboard.webp
Copy to Clipboard
Copies the result of the last action to the clipboard.

Extra Details

Link to Run Shortcut
shortcuts://run-shortcut?name=Wrap%20text%20as%20code%20block
Link to Open Shortcut
shortcuts://open-shortcut?name=Wrap%20text%20as%20code%20block
AppleScript code
tell application “Shortcuts Events” run shortcut “Wrap text as code block” end tell

More From This Folder

More From The Library

Add Pages template

Presents a detailed series of menus grouping Pages templates by the categories found in the template picker. If you prefer one set, copy the submenu into another shortcut.

Get Shortcut »

Search my own posts on X

Using a X username inputted on import and a keyword entered when the shortcut is run, this shortcut takes the info, URL-encodes it into a X link, and opens into the app to show the results.

Get Shortcut »


Get way deeper into Shortcuts – become a member.

Browse more