Paste URLs as plain text, by default

Hi all,

I’m looking for a way to paste URL’s as plain text, by default, without extra steps.

I paste a lot of links in my notes, and I don’t want them to be clickable.

Is there any way to do this?

Installing a community plugin would be quite acceptable.

Thanks in advance!

Deirdre

Most likely the easiest solution would be to use Templater with a small template to change the url like you want it, and then insert it.

Through await tp.system.clipboard() you can get the content of the clipboard and modify to your liking. This template can then be associated with a hotkey of your choice.

How do you want to present the links in your text?

Just for clarification, are you pasting just links, or are you pasting whole blocks of text containing links inside?

Also, what do your links look like in source mode? I only ask because Obsidian will try and make bare URLs into links even if they’re not specifically in markdown or HTML link structures. For example, just typing…

results in a clickable link for me in the default theme, no markdown required. I have to actually add back ticks to quote links to make them unclickable

`www.google.com`
  • If you’re just pasting individual links, then I’d definitely go down the path suggested by @holroy .
  • If you’re inserting blocks of text containing links, it will be trickier. I originally was going to suggest pasting as plain text using Ctrl-Shift-V, but the fact that Obsidian will render bare URLs as clickable breaks that as a solution.

If you just don’t like plain text links being clickable, you might be able to add a CSS snippet to make all bare links render as unclickable.

Hi guys - just pasting links, like https://www.google.com/, in a table, for notes.
Holroy, that solution is waaaay above my head :wink:

Maybe this thread could be of help:

Would you be happy with using back tick quotes to make them unclickable?

`https://www.google.com/`

If so, you could use the Templater plugin as suggested by @holroy, more specifically, you could use the following template.

<% "\`" + await tp.system.clipboard() + "\`" %>

Set-Up

  1. Install the Templater plugin
  2. Open the Templater plugin settings and create a directory for your templates
  3. Create a note with the above template in it and save it in your template directory
  4. Open the Templater plugin settings and assign a hot key of your choice to this template.

Usage

  1. Copy the link
  2. Move your cursor to the desired location
  3. Type the hotkey combo you assigned to the template.

This is waaay too complicated for what must be a common request.

I installed Templater, followed what I thought were correct instructions, and now it pastes <% navigator.clipboard.readText() %> instead of a link.

Sorry guys, I give up. Thanks for your help.

One thing to be careful about. There is the core “Templates” plugin and the “Templater” plugin. I’ve had issues like you’re experiencing when I accidentally invoked the Templates: Insert template command. This command is for the wrong plugin.