I'm trying to make an email signature builder using HTML, CSS and Javascript. I currently consists of a form where the user enters their details and a button to create the signature.
When the button is clicked, I have JS push the details the user has entered into an HTML template and then display the content in an IFrame on the same page. I chose to use an IFrame so that the signature styling is separate from the styling used for the builder page.
Now to make things simpler for the user, I would like to add a button which highlights the contents of the IFrame and then copies it to the clipboard for the user to paste into their Outlook email signature.
I've searched and this answer seems to be fairly popular but I can't highlight the contents of the IFrame. Any ideas on what I've got to do to make this work?