- range.shrink( CKEDITOR.SHRINK_TEXT );\r
- var root = range.getCommonAncestor();\r
- return root.getAscendant( 'a', true );\r
+ // Opera and WebKit don't make it possible to select empty anchors. Fake\r
+ // elements must be used for them.\r
+ fakeAnchor : CKEDITOR.env.opera || CKEDITOR.env.webkit,\r
+\r
+ // For browsers that don't support CSS3 a[name]:empty(), note IE9 is included because of #7783.\r
+ synAnchorSelector : CKEDITOR.env.ie,\r
+\r
+ // For browsers that have editing issue with empty anchor.\r
+ emptyAnchorFix : CKEDITOR.env.ie && CKEDITOR.env.version < 8,\r
+\r
+ tryRestoreFakeAnchor : function( editor, element )\r
+ {\r
+ if ( element && element.data( 'cke-real-element-type' ) && element.data( 'cke-real-element-type' ) == 'anchor' )\r
+ {\r
+ var link = editor.restoreRealElement( element );\r
+ if ( link.data( 'cke-saved-name' ) )\r
+ return link;\r
+ }\r