Insert text in a blockquote/callout via pasting

Steps to reproduce

  1. Create a multi-line blockquote or a callout.
> [!example] Title
> Contents
> Contents
> Contents
> Contents
  1. Copy text with line breaks.
Line 1
Line 2

Line 3
  1. Click into the blockquote to edit in the the live preview mode.
  2. Paste the selection in the middle of the blockquote.

Expected result

The pasted text is properly kept within the callout/blockquote.

Actual result

The pasted text breaks out of the callout/blockquote.

Environment (sandbox valut)

SYSTEM INFO:
Obsidian version: v1.1.9
Installer version: v0.15.9
Operating system: Windows 10 Pro 10.0.22621
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on


Additional information

One way I think would improve the experience of editing blockquotes/callouts in the live preview mode, is to treat the contents of the blockquote/callout as its own mini-editor (ignoring the > in the begging of lines) and then apply the >s back appropriately.

This is the main reason why I don’t (but would like to) use callouts in Obsidian, as the > get in the way when copying or pasting.

8 Likes

There is a command available from the command palette, “Toggle blockquote”, which might make it a little easier for you. It either adds or removes the quotes in front of the selected text.

Assign that to a hotkey, and you can toggle it either way before you do various copy/paste operations.

Thanks for the tip - I sometime use this command, but it still doesn’t make working with blockquotes easy enough.

The ideal solution when editing a blockquote would be: the > not being selectable (could still be visible).

2 Likes

Has anyone come up with a good solution for this? I often end up having multiple recursively embedded callouts, and it is hard to adjust the block quote layer of a selection on the fly. I usually have to use multi-cursor which is annoying.

+1 to the topic

Just upvoting/reinforcing this FR.

This video shows the behaviour:

3 Likes

I’ve arrived at the following solution.

One time setup:

  • install the Paste Mode plugin
  • configure it to keep doing the Obsidian default “Plain Text” paste mode behaviour (I don’t want the regular behaviour to change)
  • add a keyboard shortcut for “Paste Mode: Paste in Text (Blockquote) Mode”, I’ve set it to Cmd + Alt + p

To create a quote:

  • copy the text you want to put into a quote
  • start the quote (block) how you usually do (I use an Alfred snippet). I use different callouts so I don’t want this all in one step.
  • then press your previously configured keyboard shortcut
3 Likes

I have a similar problem : I use a template to import Zotero references in notes, using Zotero Integration plugin.

My template creates a callout that (tries to) contain the paper abstract.

Problem : when the abstract contains empty lines or lists, the rest of the abstract goes outside of the callout…

I would love to find a workaround instead of the manual edition I do for now…

For example, if there was an alternative syntax with an opening and closing tag it would solve my problem and yours.