About the copy and paste function of st.experimental_data_editor

Hey, the copy/paste functionality of the st.data_editor uses the Clipboard API. This sometimes requires additional settings depending on how the Streamlit frontend is served. If it is served through an iframe, it requires adding the clipboard-write permission to the iframe:

 <iframe allow="clipboard-write;">...

Potentially also the clipboard-read permission, but Iā€™m not 100% certain on this.

Also, on the first paste on the website, the user will get asked to allow this clipboard access:

image

If the user blocks this access, the feature will not work. Itā€™s also possible that the user has configured the browser to always block this feature.

1 Like