New behavior when Copy/Pasting links

There are several sites we use in my forum that we use a link to make a one-box. Starting this morning, this behavior has changed. I usually do a copy and then a “paste as plain text” to only paste the link.

This morning when I try to paste as plain text, it’s making this:

This does NOT make a one-box. I then have to remove all the brackets and parentheses in order for it to make the one-box.

Is this a new behavior for Discourse? Or does this have something to do with the sites I’m using?

EDIT: and I’m just now reading the new release notes. So does this mean I will ALWAYS have to remove brackets/parentheses in order to get the one-box back?

EDIT 2: Just tried to change links in a different post, and all I wanted was to replace the link, but again it defaulted to < screenshot above > and I was forced to delete all that extra.

Is this a permanent change?

3 Likes

I was initially confused by this too… there’s a topic where the feature was developed here: Idea: Paste links in the editor

So the idea is that you highlight some text, and then pasting a URL turns the highlighted text into the label for the link.

I’m not sure if it would make sense to disable the functionality if the highlighted text is already a URL (would the inconsistency be confusing)? or maybe this is a useful feature as-is and we just need to get used to the change?

Interested to hear if this becomes a common point of confusion.

1 Like

If anyone is taking a vote, I’m against this change. We use the one box a lot and this is counter-productive.

I also post several links everyday to anime deals and I copy/paste from the previous day and replace the links and this is really not working out.

I don’t know how an url has planned work here when pasted, but it should become

  • when pasted as an plain url without any choosed text it should act as earlier, as onebox or plain link
  • when there is choosed some text and pasting a link ”over” it, it should create a normal link with brackets and everything
2 Likes

It should be pretty straightforward to test if a selection has a url, and if so, default to normal pasting. I can add a follow up PR

3 Likes

Updated in UX: only apply link formats on paste to selections that do not contain links by gwwar · Pull Request #15159 · discourse/discourse · GitHub

3 Likes

This topic was automatically closed after 42 hours. New replies are no longer allowed.