Toolbar and associated table

I want to have a button in my table's toolbar that copies the tables text to the clipboard. I have achieved this functionality by adding a button to the toolbar and using this little bit of javascript to copy it out.

{{
Object.keys(table1.data[0]).join('\t') + '\n' + table1.data.map(row => Object.values(row).join('\t')).join('\n') }}

if I am adding this function to the toolbar is there a way for me to reference the attached table instead of specifically saying table.data? I would like to add this as a default to all my tables so that I do not have to go in and fix this script to point to the correct table every time. This was how I thought to acomplish the desired functionality, but I am open to a compeletely different approach if there is a better way to solve this.

Hey @James_Tuxbury!

Great question. It sounds like you're looking for something like {{self.data}}—would this work for you?

Hello @victoria thank you for you assistance that is exactly what I was looking for.