X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Felementspath%2Fplugin.js;h=58cacc3397a1915e70ec789b1b0a6208eb94e10f;hp=47e7c4785bec7b7ca25fb4939213ecb4d132c11a;hb=614511639979907ceb0da3614122a4d8eb963ad4;hpb=039a051ccf3901311661022a30afd60fc38130c9 diff --git a/_source/plugins/elementspath/plugin.js b/_source/plugins/elementspath/plugin.js index 47e7c47..58cacc3 100644 --- a/_source/plugins/elementspath/plugin.js +++ b/_source/plugins/elementspath/plugin.js @@ -155,7 +155,15 @@ CKEDITOR._.elementsPath = editor.focus(); var element = editor._.elementsPath.list[ elementIndex ]; - editor.getSelection().selectElement( element ); + + if ( element.is( 'body' ) ) + { + var range = new CKEDITOR.dom.range( editor.document ); + range.selectNodeContents( element ); + range.select(); + } + else + editor.getSelection().selectElement( element ); return false; },