7

第21课:剪贴板的使用

 3 years ago
source link: https://blog.csdn.net/nokiaguy/article/details/108729636
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
第21课:剪贴板的使用_李宁的极客世界bgJBm&nku$q$-CSDN博客

在 Electron 中通过 clipboard 对象操作剪贴板,目前主要支持如下几种类型的数据:

  • HTML 代码
  • RTF 文档

通过 readxxx 和 writexxx 方法,可以分别从剪贴板读取和写入上述 4 个类型的数据,其中 xxx 是 Text、HTML、RTF 和 Image。下面的例子演示了如何在 Electron 应用中操作剪贴板。

(1)首先编写主页面 index.html 的代码。


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK