您的浏览器不支持使用工具栏按钮或上下文菜单选项进行粘贴
Your browser doesn‘t support pasting with the toolbar button or context menu option
大家好,你们好吗?我将使用 CKEDITOR 代码添加文本编辑器栏,一切都很好 运行 但问题是当我单击编辑器时 复制和过去 按钮然后它给我错误像
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.
任何人都可以告诉我我可以做些什么来解决这个错误当我点击文本编辑器按钮时它开始工作并且最后我想在图片中向你展示错误所以下面的图片是错误看到报错图
或许你就容易明白了
<!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();
}
})
});
大家好,你们好吗?我将使用 CKEDITOR 代码添加文本编辑器栏,一切都很好 运行 但问题是当我单击编辑器时 复制和过去 按钮然后它给我错误像
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.
任何人都可以告诉我我可以做些什么来解决这个错误当我点击文本编辑器按钮时它开始工作并且最后我想在图片中向你展示错误所以下面的图片是错误看到报错图
或许你就容易明白了<!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();
}
})
});