-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<textarea cols="80" id="classic" name="classic" rows="10"> | ||
<p>¯\_(ツ)_/¯</p> | ||
<blockquote> | ||
<p>Success is going from failure to failure without losing enthusiasm.</p> | ||
<cite>– Winston Churchill</cite> | ||
</blockquote> | ||
</textarea> | ||
|
||
<script> | ||
var editor = CKEDITOR.replace( 'classic', { | ||
allowedContent: true | ||
} ); | ||
|
||
editor.on( 'instanceReady', function() { | ||
var editable = editor.editable(); | ||
|
||
editable.on( 'copy', function() { | ||
editor.showNotification( 'copy event fired.' ); | ||
} ); | ||
|
||
editable.on( 'cut', function() { | ||
editor.showNotification( 'cut event fired.' ); | ||
} ); | ||
|
||
editable.on( 'paste', function() { | ||
editor.showNotification( 'paste event fired.' ); | ||
} ); | ||
} ); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
@bender-ui: collapsed | ||
@bender-ckeditor-plugins: wysiwygarea, toolbar, clipboard, floatingspace, htmlwriter, blockquote, notification | ||
|
||
1. Select some text in the editor. | ||
2. Click the *Copy* button. | ||
3. Click somewhere else. | ||
4. Press `Ctrl + V` to paste the text. | ||
|
||
#### Expected result: | ||
|
||
**Chrome:** Selected text should be copied into clipboard and pasted into editor. Notifications should be opened for copy and paste. | ||
|
||
**IE:** A security alert may be displayed – confirm it. After confirming it everything should be the same as in Chrome. | ||
|
||
**Other browsers:** There should be a notification with information that copying is not available. | ||
|
||
---- | ||
|
||
1. The same as above, but use the *Cut* button. | ||
|
||
#### Expected result: | ||
|
||
The same as above. | ||
|
||
---- | ||
|
||
1. Copy some text from the editor. | ||
2. Press the *Paste* button. | ||
|
||
#### Expected result: | ||
|
||
**IE:** A security alert may be displayed – confirm it. After confirming the content should be pasted. | ||
|
||
**Other browsers:** The paste dialog should be displyed. |