giovanni Posted April 25 Share Posted April 25 Hi all, I often need to copy markdown text (typically from Obsidian) from my desktop and paste it on my phone using the Universal Clipboard, but the pasted text loses all line breaks. If I show the clipboard in Terminal with pbpaste, the line breaks are shown correctly, but if I paste on my iPhone they are gone. I tried to replace \n with \r and \r\n in the clipboard, to no avail. I also tried to covert to RTF using @vitor's MarkdownTransform, but I still lose the line breaks. A suboptimal workaround is to first paste the text in a rich-text format app, then copy it from there, but that introduces an extra line break. Does anybody else have the same issue? I was hoping to create a Universal Action to copy text for the purpose of pasting it via Universal Clipboard while preserving the line breaks. Link to comment
vitor Posted April 25 Share Posted April 25 4 hours ago, giovanni said: I tried to replace \n with \r and \r\n in the clipboard, to no avail. Have you tried replacing it with \n\n? Or try three or four. I had to do that with Markdown Transform for pasting as BBCode. Also try adding two spaces at the end of each line to force a line break. It would be useful to know where the collapsing is happening. I suspect it might the app you’re pasting to on iOS. Link to comment
giovanni Posted April 25 Author Share Posted April 25 thanks, good suggestions! Extra spaces or \n don't help. 1 hour ago, vitor said: I suspect it might the app you’re pasting to on iOS. Yes, it is Gmail for iPhone. Pasting works fine in Apple Notes... therefore a slightly better workaround is to paste in Notes first, then copy and paste in Gmail. Thanks! Link to comment
vitor Posted April 25 Share Posted April 25 1 hour ago, giovanni said: therefore a slightly better workaround is to paste in Notes first, then copy and paste in Gmail. Might be janky, but maybe you can make a Shortcut for that, or some of the steps? E.g. auto-create a new note, then copy it? Or maybe save a file to iCloud Drive and have the Shortcut copy that? Or send the text via AirDrop? giovanni 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now