X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2Fpackagist%2Fpiedsjaloux-ckeditor-component.git;a=blobdiff_plain;f=sources%2Fplugins%2Fclipboard%2Fdev%2Fconsole.js;fp=sources%2Fplugins%2Fclipboard%2Fdev%2Fconsole.js;h=96ccd816a191f24b0447f845752f787df3c9747f;hp=0000000000000000000000000000000000000000;hb=317f8f8f0651488f226b5280a8f036c7c135c639;hpb=1096cdefb1c9a3f3c4ca6807e272da6c92e5ed9c diff --git a/sources/plugins/clipboard/dev/console.js b/sources/plugins/clipboard/dev/console.js new file mode 100644 index 0000000..96ccd81 --- /dev/null +++ b/sources/plugins/clipboard/dev/console.js @@ -0,0 +1,49 @@ +/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ + +/* global CKCONSOLE */ + +'use strict'; + +( function() { + var pasteType, pasteValue; + + CKCONSOLE.add( 'paste', { + panels: [ + { + type: 'box', + content: + '', + + refresh: function() { + return { + header: 'Paste', + type: pasteType, + value: pasteValue + }; + }, + + refreshOn: function( editor, refresh ) { + editor.on( 'paste', function( evt ) { + pasteType = evt.data.type; + pasteValue = CKEDITOR.tools.htmlEncode( evt.data.dataValue ); + refresh(); + } ); + } + }, + { + type: 'log', + on: function( editor, log, logFn ) { + editor.on( 'paste', function( evt ) { + logFn( 'paste; type:' + evt.data.type )(); + } ); + } + } + ] + } ); +} )();