X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fimage%2Fdialogs%2Fimage.js;h=992d700c061695f55b6b4af641ba6cd87c886ea6;hp=8902f9b3c0d5f4035659e946add277373cd1d8d9;hb=2f22c0c38f17e75be5541089076885442aaa2377;hpb=e73319a12b56100b29ef456fd74114fe5519e01c diff --git a/_source/plugins/image/dialogs/image.js b/_source/plugins/image/dialogs/image.js index 8902f9b..992d700 100644 --- a/_source/plugins/image/dialogs/image.js +++ b/_source/plugins/image/dialogs/image.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -266,7 +266,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license btnLockSizesId = numbering( 'btnLockSizes' ), btnResetSizeId = numbering( 'btnResetSize' ), imagePreviewLoaderId = numbering( 'ImagePreviewLoader' ), - imagePreviewBoxId = numbering( 'ImagePreviewBox' ), previewLinkId = numbering( 'previewLink' ), previewImageId = numbering( 'previewImage' ); @@ -290,8 +289,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license this.addLink = false; var editor = this.getParentEditor(), - sel = this.getParentEditor().getSelection(), - element = sel.getSelectedElement(), + sel = editor.getSelection(), + element = sel && sel.getSelectedElement(), link = element && element.getAscendant( 'a' ); //Hide loader. @@ -1077,7 +1076,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license style : 'width:95%;', html : '
' + CKEDITOR.tools.htmlEncode( editor.lang.common.preview ) +'
'+ ''+ - '
'+ + '
'+ ''+ '' + ( editor.config.image_previewText ||