- var item = elements.getItem( i );\r
- if ( item.getAttribute( '_cke_realelement' ) && item.getAttribute( '_cke_real_element_type' ) == 'anchor' )\r
- anchors.push( editor.restoreRealElement( item ) );\r
+ var links = editor.document.getElementsByTag( 'a' );\r
+ for ( i = 0, count = links.count(); i < count; i++ )\r
+ {\r
+ item = links.getItem( i );\r
+ if ( item.data( 'cke-saved-name' ) || item.hasAttribute( 'name' ) )\r
+ anchors.push( { name : item.data( 'cke-saved-name' ) || item.getAttribute( 'name' ), id : item.getAttribute( 'id' ) } );\r
+ }\r
+ }\r
+ else\r
+ {\r
+ var anchorList = new CKEDITOR.dom.nodeList( editor.document.$.anchors );\r
+ for ( i = 0, count = anchorList.count(); i < count; i++ )\r
+ {\r
+ item = anchorList.getItem( i );\r
+ anchors[ i ] = { name : item.getAttribute( 'name' ), id : item.getAttribute( 'id' ) };\r
+ }\r