Created
May 16, 2023 02:58
-
-
Save musou1500/ed7a5968182ad43586169b9d91683696 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//vscodeはコードをコピーしたとき、シンタックスハイライトされたhtmlをクリップボードに書き込む | |
// それを利用すると簡単にシンタックスハイライトされたhtmlを入手できる | |
(async () => { | |
const item = (await navigator.clipboard.read()).find(item => item.types.includes('text/html')); | |
item&&console.log(await (await item.getType('text/html')).text()); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment