# Markdown Codeblock for Raycast

URL: https://www.raycast.com/lachero/markdown-codeblock

> Wrap copied or selected code in a Markdown code block with a language tag and paste it into the active app.

- Install: raycast://extensions/lachero/markdown-codeblock
- Author: [Asaf](https://www.raycast.com/lachero)
- Installs: 510
- Platforms: macOS
- Categories: Developer Tools
- Updated: 2026-11-17
- Source: https://github.com/raycast/extensions/tree/5bcd41ff46cf8ad355e98f11bb7e716c6fdafc4b/extensions/markdown-codeblock/

## Commands

- **Markdown Codeblock**: Wrap the clipboard text in a markdown codeblock and paste it into the active application

## README

### Markdown Codeblock

Wraps your code in a Markdown code block.

This works well when chatting with AI, as it provides more context for the code block.

#### Recommended Hotkey

`⌘;`

#### How to Use

##### Paste from Clipboard

1. copy the code you want to wrap in a codeblock and run the command
2. select the language you want to use for the codeblock and press enter (⏎)

##### Paste from Selection

1. select the code you want to wrap in a codeblock and run the command
2. select the language you want to use for the codeblock and press cmd + enter (⌘⏎)

![Markdown Codeblock](https://github.com/raycast/extensions/raw/5bcd41ff46cf8ad355e98f11bb7e716c6fdafc4b/extensions/markdown-codeblock//images/markdown-codeblock-2.gif)

#### Example

I have the following code in my clipboard:

```go
package main

import "fmt"

func main() {
    fmt.Println("Hello, World!")
}
```

I run the command and select `go` as the language for the codeblock:

and the codeblock is inserted in the markdown file:

````markdown
```go
package main

import "fmt"

func main() {
    fmt.Println("Hello, World!")
}
```
````

#### Credits

Thanks for icons from [vscode-material-icon-theme](https://github.com/material-extensions/vscode-material-icon-theme)
