# Paste as code block

**URL:** <https://forum.obsidian.md/t/paste-as-code-block/39289>\
**Category:** Feature requests\
**Created:** [June 21, 2022, 2:50pm UTC](https://forum.obsidian.md/t/paste-as-code-block/39289 "2022-06-21T14:50:53Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![blue\_emperor](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/b/9e8a1a/32.png) [@blue\_emperor](https://forum.obsidian.md/u/blue_emperor)\
**Post date:** [October 19, 2025, 10:53am UTC](https://forum.obsidian.md/t/paste-as-code-block/39289/4 "2025-10-19T10:53:50Z")

</div>

> [@Automatically paste as plaintext when the cursor is inside a code block](https://forum.obsidian.md/t/automatically-paste-as-plaintext-when-the-cursor-is-inside-a-code-block/16146):
>
> Use case or problem When copying and pasting text that goes inside code blocks they should be pasted as plaintext by default, I can’t think of a reason where converting to markup inside a code block is the desired outcome or even if it is even common. That might be my bias flying high, so correct me if that is a wrong assumption. Proposed solution I know we have context menu and shortcuts to paste as text, but doing the right thing™ automatically is a better experience. If the cursor is inside …

> [@Paste as code block](https://forum.obsidian.md/t/paste-as-code-block/39289):
>
> During my work I find myself copying and pasting parts of code inside notes obsidian. To do this correctly I have to first create a code block and then paste the code inside it. It would be useful to a lot of people the possibility to have an hotkey to “Paste as code block”. Use case Create a multiline code block and paste inside it the content of the clipboard. Proposed solution Have a configurable hotkey to paste directly in a codeblock Current workaround Currently I didn’t found a way t…

&nbsp;

With QuickAdd:

 ![image](https://forum.obsidian.md/uploads/default/original/3X/f/3/f389b56c0a2582b3ec73535334c40ab312ce897c.png)

 ![image](https://forum.obsidian.md/uploads/default/original/3X/a/1/a1b43722d44a359cfeb04f15cf8a578b46a2c393.png)

Clipboard content can be conflicted with exsisting QuickAdd syntax (see [https://quickadd.obsidian.guide/docs/FormatSyntax](https://quickadd.obsidian.guide/docs/FormatSyntax)).

&nbsp;

With Raycast / snippets (mac):

 ![image](https://forum.obsidian.md/uploads/default/original/3X/a/2/a209aad785c710d694f6279f06d234889a582f5e.jpeg)  
[https://manual.raycast.com/snippets](https://manual.raycast.com/snippets)

---

_[View the full topic](https://forum.obsidian.md/t/paste-as-code-block/39289)._
