get correct selected text in embed hook when embedding in a lightbox