-
Notifications
You must be signed in to change notification settings - Fork 8.2k
zh-CN: create Clipboard.read()
#27464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Preview URLs Flaws (1)URL:
External URLs (2)URL:
(comment last updated: 2025-06-10 07:27:49) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some suggestions
|
||
- `unsanitized` {{optional_inline}} | ||
|
||
- : 包含字符串的数组({{jsxref("Array")}}),这些字符串为在从剪贴板读取时不应被清理的数据格式的 MIME 类型。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- : 包含字符串的数组({{jsxref("Array")}}),这些字符串为在从剪贴板读取时不应被清理的数据格式的 MIME 类型。 | |
- : 包含字符串的数组({{jsxref("Array")}}),这些字符串为在从剪贴板读取时不应被净化的数据格式的 MIME 类型。 |
</textarea> | ||
<button id="copy">复制 HTML</button> | ||
<button id="paste_normal">粘贴 HTML</button> | ||
<button id="paste_unsanitized">粘贴未清理的 HTML</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<button id="paste_unsanitized">粘贴未清理的 HTML</button> | |
<button id="paste_unsanitized">粘贴未净化的 HTML</button> |
|
||
- [Clipboard API](/zh-CN/docs/Web/API/Clipboard_API) | ||
- web.dev 上的[解锁剪贴板权限](https://web.developers.google.cn/articles/async-clipboard) | ||
- developer.google.cn 上的[异步 Clipboard API 中的未清理的 HTML](https://developer.chrome.google.cn/docs/web-platform/unsanitized-html-async-clipboard) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- developer.google.cn 上的[异步 Clipboard API 中的未清理的 HTML](https://developer.chrome.google.cn/docs/web-platform/unsanitized-html-async-clipboard) | |
- developer.google.cn 上的[异步 Clipboard API 中的未净化的 HTML](https://developer.chrome.google.cn/docs/web-platform/unsanitized-html-async-clipboard) |
|
||
#### 结果 | ||
|
||
首先单击“复制 HTML”按钮,将第一个文本区域中的 HTML 代码写入剪贴板。然后单击“粘贴 HTML”按钮或“粘贴未净化的 HTML”按钮,将清理或未清理的 HTML 代码粘贴到第二个文本区域中。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
首先单击“复制 HTML”按钮,将第一个文本区域中的 HTML 代码写入剪贴板。然后单击“粘贴 HTML”按钮或“粘贴未净化的 HTML”按钮,将清理或未清理的 HTML 代码粘贴到第二个文本区域中。 | |
首先单击“复制 HTML”按钮,将第一个文本区域中的 HTML 代码写入剪贴板。然后单击“粘贴 HTML”按钮或“粘贴未净化的 HTML”按钮,将净化或未净化的 HTML 代码粘贴到第二个文本区域中。 |
清理 => 净化
No description provided.