Lag in selecting text

I can repro the lag.

Looks like we call toMarkdown on the whole post. That post is almost 100k chars long, so it takes quite a while.

https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/components/quote-button.js#L167

Maybe we can call the server to obtain the markdown here after a certain threshold ?

3 Likes