[atom/common/api/atom_api_clipboard.cc](https://github.com/electron/electron/blob/master/atom/common/api/atom_api_clipboard.cc)

See TODO in the code.

/cc @gavignus 

atom/common/api/atom_api_clipboard.cc
const v8::Local<v8::Value> buffer,
                            mate::Arguments* args) {
  if (!node::Buffer::HasInstance(buffer)) {
    args->ThrowError("buffer must be a node Buffer");
    return;
  }
  ui::ScopedClipboardWriter writer(GetClipboardType(args));
  writer.WriteData(node::Buffer::Data(buffer), node::Buffer::Length(buffer),
                   ui::Clipboard::GetFormatType(format));
}
void Clipboard::Write(const mate::Dictionary& data, mate::Arguments* args) {
  ui::ScopedClipboardWriter writer(GetClipboardType(args));
  base::string16 text, html, bookmark;
  gfx::Image image;
  if (data.Get("text", &text)) {
    writer.WriteText(text);
    if (data.Get("bookmark", &bookmark))
      writer.WriteBookmark(bookmark, base::UTF16ToUTF8(text));
  }
  if (data.Get("rtf", &text)) {
    std::string rtf = base::UTF16ToUTF8(text);
    writer.WriteRTF(rtf);
  }
  if (data.Get("html", &html))
    writer.WriteHTML(html, std::string());
  if (data.Get("image", &image))
    writer.WriteImage(image.AsBitmap());
}
base::string16 Clipboard::ReadText(mate::Arguments* args) {