Steps to reproduce
- Copy paste multiple lines from Roam which include a code block.
Does not fail if you just copy the text inside one line.
- Paste this into Obsidian (without holding Ctrl)
The text is pastes correctly.
The text is pasted without the code block.
- Operating system: Kubuntu 20.04
- Obsidian version: v0.12.10
Pasting while holding Ctrl makes this work. Though there is no warning that some data has been lost, so I am sure I have encountered this error before while migrating my data manually and never knew. Thus I’ve probably lost some data already
Also, copying the correct result in Obsidian and pasting that back into Obsidian works I looked to see if there was a difference in ASCII characters, but it does not seem there is.
Can you examine the contents of your clipboard before pasting in Obsidian?
Examine in what way?
In Kubuntu I can view the Clipboard History, and even edit the contents. But copying in Roam or Obsidian look exactly the same.
It’s just that pasting in Obsidian fails after copying from Roam.
I meant the raw contents i.e. so you can see the copied html from roam. In Linux you can use
xclip. I don’t know about Windows.
Using xclip I can see the contents of my clipboard are as expected.
The following text pastes in Obsidian as:
Unless I hold Shift, then it pastes correct.
Alright, then I think that’s our answer! Since it’s copying the “raw” text already, you’d need Ctrl+Shift + v. If it was copying the HTML version of this, you would be able to use “normal” copy and paste. Not sure if this could depend on your browser, but I guess you could also approach Roam and ask them to give you a way to copy HTML instead of raw text.
If you don’t paste from websites very often (or don’t care about pasting with formatting from them) then you can disable this in the settings so Ctrl+v always pastes the raw text.
I don’t understand. XClip gives me the same result, whether I copy it in Obsidian or Roam.
Where can I disable formatting on paste in the Obsidian settings?
Settings > Editor, you’ll find this:
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.