But if I paste it to some HTML editor/component/blog I get the formatting.
How is this formatting stored in clipboard?
In the case of text, very often what is copied is plain text + formatted text like HTML or RTF (i.e. there are two - or more - "items" loaded to the clipboard) and when you paste, what is pasted is the default (or the only) kind of text that the program accepts (notepad accepts only plain text, other programs might allow you to choose between paste or paste text only).
Check:
https://freeclipboardviewer.com/windowsclipboard/
Try:
Others already recommended software that will let you see what's currently on the clipboard. In the past, Windows had application for that.
https://www.techspot.com/guides/1665-windows-clipboard-manag...
Here are some official docs
https://learn.microsoft.com/en-us/windows/win32/dataxchg/cli...