I do this on some forms and pages. here is a copy to clipboard JavaScript function with it. You can work out what HTML version you want to use. but this is one way.
my $Some_HTML_Content = ''; # we can just convert the arrows for any textarea so we don't brake ou +t of # our textarea below. $Some_HTML_Content =~ s/<\/textarea>/<\/textarea>/g; print <<"HTML"; <textarea id="html" name="html">$Some_HTML_Content</textarea> <input type="button" value="Copy To Clipboard" onclick="copy_to_clipbo +ard('html');"> <!-- Copy To Clipboard --> <script> function copy_to_clipboard(id) { document.getElementById('html').select(); document.execCommand('copy'); } </script> HTML
Update: Or another way I have done it is with JavaScript regex to convert all the HTML entities when you copy to clipboard.
Update2: or you can just wright the file content as Content-Type: text/plain and display it in an Iframe or JavaScript.
In reply to Re: HTML code escaped from web page on browser
by $h4X4_|=73}{
in thread HTML code escaped from web page on browser
by sylph001
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |