]> git.immae.eu Git - perso/Immae/Projets/packagist/connexionswing-ckeditor-component.git/blob - sources/plugins/clipboard/dev/console.js
Initial commit
[perso/Immae/Projets/packagist/connexionswing-ckeditor-component.git] / sources / plugins / clipboard / dev / console.js
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 } )();