pull down to refresh

So now I have to paste my templates in compose and edit in that view?

reply

So I thought I ran into the same thing yesterday (though I was pasting from Obsidian) but I didn't continue the post and fell asleep so I never got to look into it haha.

  1. When I paste markdown from a text editor, it works fine. This is because the text editor only copies plaintext content-type into the clipboard
  2. When I paste markdown from a rich text editor, like obsidian or Apple notes (just confirmed this) then it escapes the markdown.

I think this is because the browser now selects the richtext before the plaintext from the clipboard.

Where before, we did the awful thing of writing markdown in rich text editors and then pasting that into SN, with the new editor, there are some edges to it that we run into now.

This has something to do with PR #2869, so I'm going to tag @sox for awareness.

reply
198 sats \ 4 replies \ @sox 25 Mar

Perfect analysis, thank you ^^

I don’t know if I should disable escaping by default, but it felt correct to do so when pasting from rich sources.

reply

Disable by default in write, enable by default in compose?

reply
101 sats \ 2 replies \ @sox 25 Mar

Hmm, could work. I just hope that unintentional markdown formatting won’t be as big a problem as I’m making it out to be

reply
269 sats \ 1 reply \ @optimism 25 Mar

I think that the intent of write is to intentionally write markdown, but the intent of compose is to write rich text. So since markdown is plaintext, I think it makes sense to not mess with plaintext pastes (and prefer plaintext) in that mode.

I think that that protects both wanna-paste-richtext stackers and stackers that just want to paste their templates to fill in all the things.

(also, Apple Notes title, heading, subheading markup will result in **text**, not ### text for me, so that isn't a viable path either because shit gets lost)

reply
252 sats \ 0 replies \ @sox 25 Mar

The whole purpose of this copy/paste update is to support rich text clipboard payloads in markdown mode, so that we can convert rich text into markdown. When it works, it’s actually really great and saves loads of time because you don’t have to add spacings and formatting yourself.

imo, just disabling escaping is enough in this case!

reply
192 sats \ 0 replies \ @sox 25 Mar

When pasting content copied from other websites, we escape what-can-be markdown formatting. For example if a paste contains:

[abc] some words

We want to escape those square brackets otherwise we’d introduce unintended markdown formatting.


I did add a clause though, we escape markdown formatting only if the copied content comes from a rich editor like Apple Notes or a website.

Anyway, you can skip escaping by holding shift while pasting. I should probably invert these conditions because mobile doesn’t have a shift key

reply
10 sats \ 1 reply \ @sox 25 Mar
So now I have to paste my templates in compose and edit in that view?

To reply to this, the result won’t change because you’re copying markdown from a rich text editor that doesn’t even know markdown. The rich text editor will copy content as text nodes, not markdown.

reply
84 sats \ 0 replies \ @sox 25 Mar

@BlokchainB in the meantime, copy your apple note via Share -> Copy instead of selection+copy. It will copy unformatted text and our editor won’t escape anything in that case.

reply

In write

reply

very very confusing

reply