# csv_preview: Allow copying cell and column header content \(\#61769\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/d8664715ad9b2adc0aa7a5ec8aa239799528aff2)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: d8664715ad9b2adc0aa7a5ec8aa239799528aff2

Requested commit: d8664715ad9b2adc0aa7a5ec8aa239799528aff2

Commit: d8664715ad9b2adc0aa7a5ec8aa239799528aff2

Tree: 80b771c91e0b40022de51e092c9a413542db6de4

Author: Oleksandr Kholiavko

Committer: GitHub

## Message

```
csv_preview: Allow copying cell and column header content (#61769)

# Objective

- There was no way to copy a cell's or a column header's text out of the
CSV preview table (at all).

## Solution

- Right-clicking a table cell now copies its full content to the
clipboard; the cell tooltip shows the content plus a "Right click to
copy content" hint.
- Right-clicking a column header name copies the column name to the
clipboard, with the same tooltip pattern ("Right click to copy column
name").

## Testing

- Right-click a cell: content is copied, tooltip shows the hint.
- Right-click a column header: column name is copied, tooltip shows the
hint.

## Demo

<img width="994" height="241" alt="image"
src="https://github.com/user-attachments/assets/827a0356-e152-4bfd-84ea-5745e638f13c"
/>


## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Added copy-to-clipboard on right-click for CSV preview cells and
column headers
```

## Parents

- [cd6d7055733ab4bc88f8407c2c2c0ba3c36ea2af](https://git.cafe/gitcafe/zed/commit/cd6d7055733ab4bc88f8407c2c2c0ba3c36ea2af?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/d8664715ad9b2adc0aa7a5ec8aa239799528aff2?format=markdown)
