                 <button>Delete</button>
             </div>
             """
+        pop.link = pop.getElementsByTagName('A')[0]
         b = document.querySelector('body')
         # b.insertBefore(frag,b.firstChild)
         [btnOK, btnCancel, btnDelete] = pop.querySelectorAll('button')

        if href == '' or href == 'http:///'
            href = 'http://'
        pop.urlInput.value = href
        txt = ''
        txt += seg.textContent for seg in segments
        pop.textInput.value = txt
        pop.initialTxt = txt
        
        # Insert the popover
        seg.parentElement.parentElement.appendChild(pop)

            <span class="CNE_urlpop_head">Link</span>
            <span  class="CNE_urlpop_shortcuts">(Ctrl+K)</span>
            <div class="CNE_urlpop-content">
                <a target="_blank">Open link <span class="CNE_urlpop_shortcuts">(Ctrl+click)</span></a></br>
                <span>url</span><input type="text"></br>
                <span>Text</span><input type="text"></br>
                <button>ok</button>
