上下文菜单粘贴

发布于 2025-01-14 16:32:58 字数 148 浏览 2 评论 0原文

我在应用程序中使用tinymce,并希望使用上下文菜单选项粘贴复制的内容。但是,我在文档中没有看到粘贴选项。请问有人可以提供文档或示例吗?

Link: https://codepen.io/balukantu/pen/abEOvKr

I am using tinymce in my application and would like to paste the copied content using context menu options. However, I don't see paste options in the documentation. Could you please someone provide the documentation or example?

Link: https://codepen.io/balukantu/pen/abEOvKr

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

攒眉千度 2025-01-21 16:32:58

您将能够在大多数现代浏览器上执行您想要的操作。

如果您尝试使用 TinyMCE 中内置的剪切/复制/粘贴工具栏按钮或菜单选项,您会在大多数浏览器中看到以下内容:

“您的浏览器不支持直接访问剪贴板。请
请改用 Ctrl+X/C/V 键盘快捷键。”

正如编辑器中的消息所述,这只是您在某些浏览器中可以/不能直接通过 JavaScript 执行的操作的限制。IE11

确实允许通过旧版 API 进行访问,但不允许目前其他浏览器完全支持剪贴板 API,因此复制剪贴板中内容的唯一方法是使用键盘。

You will be able to do what you want on most modern browsers.

If you try to use the built in Cut/Copy/Paste toolbar buttons or menu options in TinyMCE you see this for most browsers:

"Your browser doesn't support direct access to the clipboard. Please
use the Ctrl+X/C/V keyboard shortcuts instead."

As the message from the editor states this is simply a limitation of what you can / cannot do directly via JavaScript in certain browsers.

IE11 does indeed allow access via legacy APIs but no other browser at present supports the clipboard APIs at all so the only way to copy what is in the clipboard is to use the keyboard.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文