-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Your browser doesn't allow you to paste this way. Press Ctrl+V to paste. #469
Comments
I'm experiencing the same issue |
This is actually working by design. With 4.7.0 release we decided to finally drop our good old Paste dialog to simplify pasting process as much as possible. Ideally we'd like the browser to just paste and that's it - however, due the security reasons, modern browsers do not expose any means to paste other than using native ways, so:
Will trigger paste, but the website can not initiate it on it's own. The exception here would be Internet Explorer family, as it supports triggering paste command which we use. So in short this is as close as it gets, and we're unable to push it further. As soon as browser provides APIs for us to trigger the paste, we're happy to utilize that. |
Thanks. |
And also another problem with shortcuts. They not always work. A button "paste as plain text" doesn't work in windows firefox now. It says "Your browser does not allow you to paste plain text this way. Press Ctrl+Shift+V to paste." So there is no way to paste plain text in CKEditor 4.7 :( In 4.6.2 button works fine in Firefox. After using 4.7 for several days, I had to revert all my sites back to 4.6.2 |
@stalker780 This behaviour is explained in the comment above. When it comes to shortcuts conflicts the |
I understand this. I will write to ABP developer. But CKEditor's plain text paste is also broken in Android Firefox. It is used not often, but sometimes it is very handy to paste & edit texts from tablet. But in 4.7 paste from clipboard doesn't work at all. Maybe it is possible to leave old paste dialog as optional plugin? |
@stalker780 Firefox on Android is not officially supported (http://docs.ckeditor.com/#!/guide/dev_browsers). However, it might be the issue also in other mobile environments so we will have to take a closer look. Could I ask you to report it (the Android Firefox case) as a separate issue? |
As for ABP shortcut conflict, it is discussed since 2012... And still all installations of ABP have |
Thanks for reporting @stalker780. As for ABP shortcut conflict, |
@f1ames You are quite right. But documentation and standards are just theory here :) In real life it turns out quite different from what it planned to be.
I really hope you will find a good solution for this issue :) |
This limitation makes it impossible to use CKEditor on a phone (unless you know of a phone with a Ctrl and a V key. |
@christophermlne please add a 👍 reaction to #595 which is an issue where we track this issue. |
I have been using CKEditor with Drupal for years. One of the strengths of CKEditor was the 'Paste from Word' button which significantly cleaned up the extra formatting introduced by Word. In the past, I have had issues where users pasted rich text directly into a Drupal document and corrupted the document. I have trained my users to ALWAYS use 'Paste from Word'. Based on some preliminary testing, it appears CKEditor is doing some cleanup after pasting via Ctrl+V and I can tailor Advanced Content Filter to further remove undesirable rich text tags. Has anyone found a guide that shows the configuration required to re-create the functionality of 'Paste from Word' with CKEDitor 4.7? Thanks, Norbert |
I am also a Drupal Developer. In my use case I would like to swap the functionality of "ctrl+v" with "shift ctrl+v" so that in CK Editor, paste as plain text is performed when "ctrl+v" is pressed. |
Another Drupal developer here... @cnovick-doj have you managed to swap "ctrl+v" for "shift+ctrl+v"? I thought i managed to cleanup work pastings by removing allowedContent for the full html configuration but then it turns out it would strip everything, for example images... so that's not the way to go :(. I wonder would it be possible not to accept any html tag when people are pasting on the editor side and allowing tags instead when people are pasting in the "code" view? |
For Drupal 7 look at https://www.drupal.org/project/pasteformat |
Same here with 4.8.0. I do not understand, why kill a working solution and replace with a non working method. The Chrome is the most popular browser and the ckeditor after 4.6 is not compatible with it. Nonsense. |
@bunnyhu, the current ckeditor 'Paste from Word' strips out a lot of rich text formatting in Chrome - the message it generates is somewhat misleading. In some ways, I prefer it over the previous 'Paste from Word' - it replaces with
. I am comparing the results of the earlier and current 'Paste from Word' to figure out what additional tuning is required so that I keep the important formatting but get rid off the unnecessary formatting. |
@nh905 I miss the paste unformated text, that I used usually then format manual. That function is not working, when I click the button I get the error message without the old dialog box. |
This issue is problematic for us as well. At the very least there should be a way to paste as text only. |
I think the problem here is the "button" now doesn't do anything, and it confuses the end-user. The functionality is there, but you can't have a Paste as Plain Text or Paste from Word button anymore. I think the right solution would be a Clean Up button, which can function with a Dialog, where you are able to specify exactly what you'd like cleaned-up after pasting. The "paste-from-word" would then work silently in the background (with no button) and then further cleanup would be performed based on user preference? For one I don't like having the Word styles coming in. But I want to maintain specific styles generated from the CKEditor. |
@eguerin-ucsf, I couldn't have said it better. Your summary is spot on and I believe your suggestion for a "clean-up text" button combined with a dialog is the best way to handle the issue. |
The fact is that the Paste button in Word online works perfectly in all browsers. Therefore the explanation above is not convincing. I don't know if it is possible to do reverse engineering on the MS code and mimic what they do. Yet the copy and past functionality is fundamental on any editor, and the way it is implemented now (sometimes I don't get it to work even with CTRL+V) is unacceptable. |
Tried the online demos with version 4.11.3. Even in their demos they have this same issue. It seems they didn't resolve it yet. Any update / solution on this ? |
I encountered some pain from clients over the removal of the paste dialog. CKEDITOR.on("instanceReady", function(event) {
event.editor.on("beforePaste", function(event) {
event.editor._.forcePasteDialog = true;
})
}) |
My previous fix caused the paste dialog to show using pasting with 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();
}
})
}); |
@pixilation |
It would be better to make the 2nd |
@pixilation: Yes, thank you for this code snippet. Where should it be included, in default.js for the pastefromword plugin? |
I am using v4.14.1
This is basically due to this line. I have installed full version of ckeditor. Has anybody seen this kind of issue? |
I know this is closed, but explaining these kinds of decisions to end-users who rely on this functionality is impossible. It's really a bad choice just to break things that worked fine. |
Nobody know, why they do it. I just using old version, still working and I do not care what they do with the newest versions. I need this function, and if they do not want to hear the users cry, bad for them. |
Unfortunately such an approach lowers the security of your site as newer versions also include security fixes. I'd recommend upgrading to newer versions. |
It is on the protected admin side and in a random name folder, I do not care about it. I prefer the old paste method against security patch. |
Thank you, work excellent! |
Where to put this code? |
Not sure, but maybe in ckeditor.js? Also, if you're going to use a fix, use this instead: 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
else if (event.data.name == "pastetext" && event.data.commandData.from == "keystrokeHandler") {
event.cancel();
}
})
}); |
Thanks. |
Are you reporting a feature or a bug?
Bug
Check if the issue is already reported
Put all reference links here…
Provide detailed reproduction steps (if any)
Expected result
Text is pasted normally.
Actual result
Message "Your browser doesn't allow you to paste this way. Press Ctrl+V to paste." is showed.
Other details
The text was updated successfully, but these errors were encountered: