diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-01-25 17:45:33 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-01-25 18:00:33 +0100 |
commit | 7adcb81e4f83f98c468889aaa5a85558ba88c770 (patch) | |
tree | 0d6ede733777b29060b48df4afaa2c64bfbae276 /sources/plugins/clipboard/dev/console.js | |
download | connexionswing-ckeditor-component-7adcb81e4f83f98c468889aaa5a85558ba88c770.tar.gz connexionswing-ckeditor-component-7adcb81e4f83f98c468889aaa5a85558ba88c770.tar.zst connexionswing-ckeditor-component-7adcb81e4f83f98c468889aaa5a85558ba88c770.zip |
Initial commit4.5.6
Diffstat (limited to 'sources/plugins/clipboard/dev/console.js')
-rw-r--r-- | sources/plugins/clipboard/dev/console.js | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/sources/plugins/clipboard/dev/console.js b/sources/plugins/clipboard/dev/console.js new file mode 100644 index 00000000..f0cc92db --- /dev/null +++ b/sources/plugins/clipboard/dev/console.js | |||
@@ -0,0 +1,49 @@ | |||
1 | /** | ||
2 | * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. | ||
3 | * For licensing, see LICENSE.md or http://ckeditor.com/license | ||
4 | */ | ||
5 | |||
6 | /* global CKCONSOLE */ | ||
7 | |||
8 | 'use strict'; | ||
9 | |||
10 | ( function() { | ||
11 | var pasteType, pasteValue; | ||
12 | |||
13 | CKCONSOLE.add( 'paste', { | ||
14 | panels: [ | ||
15 | { | ||
16 | type: 'box', | ||
17 | content: | ||
18 | '<ul class="ckconsole_list">' + | ||
19 | '<li>type: <span class="ckconsole_value" data-value="type"></span></li>' + | ||
20 | '<li>value: <span class="ckconsole_value" data-value="value"></span></li>' + | ||
21 | '</ul>', | ||
22 | |||
23 | refresh: function() { | ||
24 | return { | ||
25 | header: 'Paste', | ||
26 | type: pasteType, | ||
27 | value: pasteValue | ||
28 | }; | ||
29 | }, | ||
30 | |||
31 | refreshOn: function( editor, refresh ) { | ||
32 | editor.on( 'paste', function( evt ) { | ||
33 | pasteType = evt.data.type; | ||
34 | pasteValue = CKEDITOR.tools.htmlEncode( evt.data.dataValue ); | ||
35 | refresh(); | ||
36 | } ); | ||
37 | } | ||
38 | }, | ||
39 | { | ||
40 | type: 'log', | ||
41 | on: function( editor, log, logFn ) { | ||
42 | editor.on( 'paste', function( evt ) { | ||
43 | logFn( 'paste; type:' + evt.data.type )(); | ||
44 | } ); | ||
45 | } | ||
46 | } | ||
47 | ] | ||
48 | } ); | ||
49 | } )(); | ||