格 千格 KiloCell

clipboard viewer

View the various mimetype data and original content of the clipboard in real time

Click here or click Ctrl+V to paste

Supports pasting of plain text, rich text (HTML), pictures, files, etc.

I'm going to get a better idea of how the clipboard works.

FAQ

Why did you paste the text from the page to Word, but then pasting it into the notebook becomes a plain text?

Solutions

The clipboard does not store only one content, but it saves multiple formats (MIME) Type). Target procedures will select the most appropriate format to read according to their own processing capacity.

What's the clipboard mime type?

When you do the Copy operation, the operating system (Windows, MacOS, Linux will create a clipboard object in the memory. This object is like a container, which contains data from different versions simultaneously. For example:

  • text/plain : No plain text in any format.
  • text/html : Rich text with HTML tags.
  • image/png : If you copy a picture, it will be stored as a binary bitmap.
  • text/rtf : Microsoft defines a rich text format.

Why do you need a clipboard viewer?

For developers, understanding the clipboard content is essential:

  • Debug Web Application : If you are developing a rich text editor (e. g. CKEditor or TinyMCE), you need to know where the browser is onpaste What kind of data were received during the incident.
  • Analysis format lost : Find out why certain metadata (e.g. links, thicker, tables) disappear when pasting across applications.
  • Security audit : Clipboard may contain sensitive metadata (e.g. file path, author information). By viewer, you can confirm that the copying operation leaks additional information.

Technically achieved: DataTransfer API

This tool uses modern browsers DataTransfer API。 Yes. paste When the event triggers, we can get through it. event.clipboardData Fetches all available data entries. We can read them through the whole thing. type (MIME Type) and extract corresponding string or file Content.

Note: For security reasons, browsers do not allow web pages to read clipboard silently without user-operated access. This tool must be on the page or paste before you can access content.