# fix: copy and paste keep formatting · clo/snowbound

[View on GitCafe](https://git.cafe/clo/snowbound/commit/a7388496fddd44f7037f7224f6300a31b9a784ea)

Repository: [clo/snowbound](https://git.cafe/clo/snowbound)

Visibility: public

Requested revision: a7388496fddd44f7037f7224f6300a31b9a784ea

Requested commit: a7388496fddd44f7037f7224f6300a31b9a784ea

Commit: a7388496fddd44f7037f7224f6300a31b9a784ea

Tree: 6b9bc64cf103ed4d186a42d18d3d21225e9c3e58

Author: clover caruso

Committer: clover caruso

## Message

```
fix: copy and paste keep formatting

Copy put plain text alone on the clipboard, so a bold line pasted back came
out regular. It now offers what OneNote 2010 does beside text (lab): HTML
with each run's font, size, weight, slant, decoration and colours inline,
links, lists as nested ul and ol, and bordered tables, which OneNote 2010
and Word 2010 paste as copied. Beside them goes Snowbound's own format, the
copied paragraphs and the styles, lists and tags they name, which pastes
back losslessly, pictures included: an NSPasteboard type on macOS, a
registered clipboard format on Windows, and on X11 this process's last copy
while the clipboard still holds its HTML.

Paste prefers that format, then HTML, then text. HTML now pastes as
formatted paragraphs, lists and tables rather than text, so what OneNote
copies (corpus/clipboard) pastes as it shows. Several paragraphs go between
the halves of the caret's paragraph, an empty half dropped, as OneNote does;
a title takes the text alone. A pasted clip stores and cold-opens in
OneNote 2010.

Assisted-by: claude-opus-5.5

```

## Parents

- [bf28ad621ca5962e64fe4ab4c73a90d92204d181](https://git.cafe/clo/snowbound/commit/bf28ad621ca5962e64fe4ab4c73a90d92204d181?format=markdown)

[Source at this commit](https://git.cafe/clo/snowbound/tree/a7388496fddd44f7037f7224f6300a31b9a784ea?format=markdown)
