Implement an easy-close modal with a HTML Input that auto selects the text on click. See R shiny for implementation details.