Please Have Below the code :
<script>
CKEDITOR.on('instanceReady', function(e){
var editor = e.editor;
editor.on('paste', function(evnt){
var data = evnt.data;
// youtube recognize
data.dataValue = data.dataValue.replace(/(?:http:\/\/)?(?:www\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=)?(.+)/g, '<iframe width="420" height="345" src="http://www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>');
//image recognize
data.dataValue = data.dataValue.replace(/(https?:\/\/.*\.(?:png|jpg))/i,'<img src="$1" width="450" height="199" alt="alt description" title="image title" class="image_classes" />');
alert(data);
data.type = 'html';
});
});
</script>