| 122 | | oAnchor.removeAttribute( 'href' ) ; |
| 123 | | } |
| 124 | | // Set the name |
| 125 | | oAnchor.name = sNewName ; |
| 126 | | |
| 127 | | // IE does require special processing to show the Anchor's image |
| 128 | | // Opera doesn't allow to select empty anchors |
| 129 | | if ( FCKBrowserInfo.IsIE || FCKBrowserInfo.IsOpera ) |
| 130 | | { |
| 131 | | if ( oAnchor.innerHTML != '' ) |
| | 123 | for ( var i = 0 ; i < aNewAnchors.length ; i++ ) |
| | 124 | aNewAnchors[i].removeAttribute( 'href' ) ; |
| | 125 | } |
| | 126 | |
| | 127 | // More than one anchors may have been created, so interact through all of them (see #220). |
| | 128 | for ( var i = 0 ; i < aNewAnchors.length ; i++ ) |
| | 129 | { |
| | 130 | oAnchor = aNewAnchors[i] ; |
| | 131 | |
| | 132 | // Set the name |
| | 133 | oAnchor.name = sNewName ; |
| | 134 | |
| | 135 | // IE does require special processing to show the Anchor's image |
| | 136 | // Opera doesn't allow to select empty anchors |
| | 137 | if ( FCKBrowserInfo.IsIE || FCKBrowserInfo.IsOpera ) |
| 133 | | if ( FCKBrowserInfo.IsIE ) |
| 134 | | oAnchor.className += ' FCK__AnchorC' ; |
| | 139 | if ( oAnchor.innerHTML != '' ) |
| | 140 | { |
| | 141 | if ( FCKBrowserInfo.IsIE ) |
| | 142 | oAnchor.className += ' FCK__AnchorC' ; |
| | 143 | } |
| | 144 | else |
| | 145 | { |
| | 146 | // Create a fake image for both IE and Opera |
| | 147 | var oImg = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__Anchor', oAnchor.cloneNode(true) ) ; |
| | 148 | oImg.setAttribute( '_fckanchor', 'true', 0 ) ; |
| | 149 | |
| | 150 | oAnchor.parentNode.insertBefore( oImg, oAnchor ) ; |
| | 151 | oAnchor.parentNode.removeChild( oAnchor ) ; |
| | 152 | } |
| | 153 | |