Skip to content
Permalink
Browse files

Merge pull request #344 from cksource/t/16968

Paste as plain text doesn't work in Safari.
  • Loading branch information...
Comandeer committed Apr 14, 2017
2 parents bae53ff + 930325e commit 41fd18b4ae0088d76a4367b3e4f20fd4a452bb02
@@ -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,
@@ -0,0 +1,15 @@
<h2>Helpers</h2>
<p><b>Some</b> <i>rich</i> <s>text</s> <sup>with</sup> <a href="http://cksource.com">link</a></p>
<h2>Editor</h2>
<textarea name="editor1" id="editor1" cols="30" rows="10">
<p>Paste the content here:</p>
<h2>And here:</h2>
</textarea>

<script>
if ( !CKEDITOR.env.safari ) {
bender.ignore();
}
CKEDITOR.replace( 'editor1' );
</script>
@@ -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, link

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.

0 comments on commit 41fd18b

Please sign in to comment.
You can’t perform that action at this time.