gpt4 book ai didi

html - 您的浏览器不支持使用工具栏按钮或上下文菜单选项进行粘贴

转载 作者:行者123 更新时间:2023-12-05 00:53:52 25 4
gpt4 key购买 nike

大家好,你们好吗?我将使用代码添加文本编辑器栏,CKEDITOR 一切都运行良好,但问题是当我点击编辑器 copy and past 按钮时它给我这样的错误

Press Ctrl+V to paste. Your browser doesn‘t support pasting with the toolbar button or context menu option.

Press Ctrl+Shift+V to paste. Your browser doesn‘t support pasting with the toolbar button or context menu option.

Press Ctrl+V to paste. Your browser doesn‘t support pasting with the toolbar button or context menu option.

谁能告诉我我可以做些什么来解决这个错误,当我点击文本编辑器按钮时它开始工作,最后我想在图片中显示错误,所以下面的图片可能是你的错误看到错误图片就很容易理解了

Error picture of my problem

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Editor Example</title>
<script src="https://cdn.ckeditor.com/4.10.1/standard/ckeditor.js"></script>
</head>
<body>
<textarea name="text_editor"></textarea>
<script>
CKEDITOR.replace( 'text_editor' );
</script>
</body>

最佳答案

试试这个代码

CKEDITOR.on("instanceReady", function(event) {
event.editor.on("beforeCommandExec", function(event) {
// Show the paste dialog for the paste buttons and right-click paste
if (event.data.name == "paste") {
event.editor._.forcePasteDialog = true;
}
// Don't show the paste dialog for Ctrl+Shift+V
if (event.data.name == "pastetext" && event.data.commandData.from == "keystrokeHandler") {
event.cancel();
}
})
});

关于html - 您的浏览器不支持使用工具栏按钮或上下文菜单选项进行粘贴,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67016394/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com