Adding Copy/Paste to individual Attributes

Anyone else think this might be useful? Currently we can copy Attributes wholesale, but sometimes I just need one attribute (like rel=noopener) that I want to quickly apply to a lot of external links. While we can use ctrl-c and ctrl-v to copy the contents of either individual field, it would be nice to be able to copy both the Key and its Value, and then paste them together (unless there’s already a way to do this that I’m unaware of?)

image

5 Likes

Just giving this a bump, since it got some likes when I posted it, but no comments.

Just want to make sure the devs see it. @martin @gabby

1 Like

Not a fan of showing icons to be honest. Maybe we can add context menu entries Copy Attribute and Paste Attribute when clicking either of the fields?

1 Like

It’s already possible to copy the individual fields by just highlighting the text and using ctrl-c / ctrl-v

My thinking was it would be nice to have a way to copy BOTH the Key and Value fields together, so they can be pasted together. It would be a time-saver when you have to add the same Key and Value to numerous components, like links.

1 Like

I’ve created a Custom Option that’s available in the “Online” section of the components menu!
It’s called: “HTML Attribute - Rel”.

It adds all the rel attributes to a single Link.

Select the link / component and “Copy Custom Options”.

After, hold CTRL and select the components you wish to add it to, then “Paste Custom Option”.
You can then add the rel attribute to the links you wish!

1 Like

Yes, sorry didn’t write it clearly. My suggestion was to add an option that copies both the attribute key and value. It will be accessible in the context menu of either of those fields. The main issue I see is that very few people would discover it.

1 Like

@martin I’m pretty sure you are 100% correct on people not discovering it since I just right clicked on the blank default one for the first time ever in what … 5 years give or take? lol.

Maybe also add it to the HTML Editing > Editing Attributes area of the docs? Probably still won’t find it, but it will be there for those that actually look there.

I actually do like @printninja’s idea better. We area already familiar with those 2 icons from the Options and Appearance tabs so it would be something people would be able to recognize. They wouldn’t take up all that much space and would be a lot more useful than an undiscovered right click menu would be.

@GregoryAM Thanks for sharing!

2 Likes

I’m a +1 for @printninja idea. I’ve done sites with a lightbox gallery and it was a pain having to do this for the data-lightbox key/value pairs on every image

Probably too late for you now, but its worth creating an image component with the common class and data attributes set and dragging it onto the page.

Thanks @richards I’ll try that next time. Maybe even give it some custom options. :ok_hand: