code: function( editor ) {
  			var editable = editor.editable(),
  
  				// The scope of search for anchors is the entire document for inline editors
  				// and editor's editable for classic editor/divarea (#11359).
  				scope = ( editable.isInline() && !editor.plugins.divarea ) ? editor.document : editable,
  
  				links = scope.getElementsByTag( 'a' ),
  				imgs = scope.getElementsByTag( 'img' ),
  				anchors = [],
  				i = 0,
  				item;
  
  			// Retrieve all anchors within the scope.
  			while ( ( item = links.getItem( i++ ) ) ) {
  				if ( item.data( 'cke-saved-name' ) || item.hasAttribute( 'name' ) ) {
  					anchors.push( {
  						name: item.data( 'cke-saved-name' ) || item.getAttribute( 'name' ),
  						id: item.getAttribute( 'id' )
  					} );
  				}
  			}
  			// Retrieve all "fake anchors" within the scope.
  			i = 0;
  
  			while ( ( item = imgs.getItem( i++ ) ) ) {
  				if ( ( item = this.tryRestoreFakeAnchor( editor, item ) ) ) {
  					anchors.push( {
  						name: item.getAttribute( 'name' ),
  						id: item.getAttribute( 'id' )
  					} );
  				}
  			}
  
  			return anchors;
  		}
docs: Collects anchors available in the editor (i.e. used by the Link plugin).
  Note that the scope of search is different for inline (the "global" document) and
  classic (`iframe`-based) editors (the "inner" document).
  
  @since 4.3.3
  @param {CKEDITOR.editor} editor
  @returns {CKEDITOR.dom.element[]} An array of anchor elements.