From 15b20d4b8e9cfdce4009cc2d9b4e204bcd83d252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Krzto=C5=84?= Date: Fri, 14 Apr 2017 08:27:43 +0200 Subject: [PATCH 1/3] Paste as plain text Safari keystroke fix. --- plugins/pastetext/plugin.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/pastetext/plugin.js b/plugins/pastetext/plugin.js index 6ce476fdb7b..d4c13261a8e 100644 --- a/plugins/pastetext/plugin.js +++ b/plugins/pastetext/plugin.js @@ -54,11 +54,13 @@ icons: 'pastetext,pastetext-rtl', // %REMOVE_LINE_CORE% hidpi: true, // %REMOVE_LINE_CORE% init: function( editor ) { - var commandName = 'pastetext'; + var commandName = 'pastetext', + pasteKeystroke = !CKEDITOR.env.safari ? CKEDITOR.CTRL + CKEDITOR.SHIFT + 86 : // Ctrl + Shift + V + CKEDITOR.CTRL + CKEDITOR.ALT + CKEDITOR.SHIFT + 86; // Ctrl + Shift + Alt + V editor.addCommand( commandName, pasteTextCmd ); - editor.setKeystroke( CKEDITOR.CTRL + CKEDITOR.SHIFT + 86, commandName ); // Ctrl + Shift + V + editor.setKeystroke( pasteKeystroke, commandName ); editor.ui.addButton && editor.ui.addButton( 'PasteText', { label: editor.lang.pastetext.button, From b6f18639fde692406ef5de13246b8fd99abb1f9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Krzto=C5=84?= Date: Fri, 14 Apr 2017 08:35:47 +0200 Subject: [PATCH 2/3] Tests: manual test. --- tests/tickets/16968/safaripasteplaintext.html | 12 ++++++++++++ tests/tickets/16968/safaripasteplaintext.md | 11 +++++++++++ 2 files changed, 23 insertions(+) create mode 100644 tests/tickets/16968/safaripasteplaintext.html create mode 100644 tests/tickets/16968/safaripasteplaintext.md diff --git a/tests/tickets/16968/safaripasteplaintext.html b/tests/tickets/16968/safaripasteplaintext.html new file mode 100644 index 00000000000..547639e228e --- /dev/null +++ b/tests/tickets/16968/safaripasteplaintext.html @@ -0,0 +1,12 @@ + + + diff --git a/tests/tickets/16968/safaripasteplaintext.md b/tests/tickets/16968/safaripasteplaintext.md new file mode 100644 index 00000000000..4585d557889 --- /dev/null +++ b/tests/tickets/16968/safaripasteplaintext.md @@ -0,0 +1,11 @@ +@bender-tags: tc, 4.7.0, 16968, pastetext +@bender-ui: collapsed +@bender-ckeditor-plugins: wysiwygarea, toolbar, undo, pastetext, sourcearea, elementspath, basicstyles, format + +1. Copy some rich text / html. +1. Focus editor and click on the `Paste as plain text` button. +1. Paste using the shortcut shown in the notification in previous step. + +**Expected:** Content is pasted as plain text. + +**Unexpected:** Nothing is pasted. From 930325ebb7031e3290cfaa78701f9c07100ef02a Mon Sep 17 00:00:00 2001 From: Tomasz Jakut Date: Fri, 14 Apr 2017 10:03:27 +0200 Subject: [PATCH 3/3] Updated manual tests. --- .../pastetext/manual}/safaripasteplaintext.html | 3 +++ .../16968 => plugins/pastetext/manual}/safaripasteplaintext.md | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) rename tests/{tickets/16968 => plugins/pastetext/manual}/safaripasteplaintext.html (63%) rename tests/{tickets/16968 => plugins/pastetext/manual}/safaripasteplaintext.md (87%) diff --git a/tests/tickets/16968/safaripasteplaintext.html b/tests/plugins/pastetext/manual/safaripasteplaintext.html similarity index 63% rename from tests/tickets/16968/safaripasteplaintext.html rename to tests/plugins/pastetext/manual/safaripasteplaintext.html index 547639e228e..af9b4a10582 100644 --- a/tests/tickets/16968/safaripasteplaintext.html +++ b/tests/plugins/pastetext/manual/safaripasteplaintext.html @@ -1,3 +1,6 @@ +

Helpers

+

Some rich text with link

+

Editor