X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fplaceholder%2Fdialogs%2Fplaceholder.js;h=d709b38e5153126f40c5d2b503d59998cb11837b;hp=8885ecd260a725a54def788773836b5228465aff;hb=48b1db88210b4160dce439c6e3e32e14af8c106b;hpb=9afde8772159bd3436f1f5b7862960307710ae5a diff --git a/_source/plugins/placeholder/dialogs/placeholder.js b/_source/plugins/placeholder/dialogs/placeholder.js index 8885ecd..d709b38 100644 --- a/_source/plugins/placeholder/dialogs/placeholder.js +++ b/_source/plugins/placeholder/dialogs/placeholder.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. + * Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -48,14 +48,7 @@ onShow : function() { if ( isEdit ) - { - var range = editor.getSelection().getRanges()[0]; - range.shrink( CKEDITOR.SHRINK_TEXT ); - var node = range.startContainer; - while( node && !( node.type == CKEDITOR.NODE_ELEMENT && node.data( 'cke-placeholder' ) ) ) - node = node.getParent(); - this._element = node; - } + this._element = CKEDITOR.plugins.placeholder.getSelectedPlaceHoder( editor ); this.setupContent( this._element ); },