You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/09/29 17:08:58 UTC

[GitHub] [beam] fernando-wizeline commented on a change in pull request #15611: [BEAM-12607] - Copy Code Snippet copies html tags

fernando-wizeline commented on a change in pull request #15611:
URL: https://github.com/apache/beam/pull/15611#discussion_r718722958



##########
File path: website/www/site/static/js/copy-to-clipboard.js
##########
@@ -13,15 +13,15 @@
 $(document).ready(function() {
     function copy() {
         $(".copy").click(function(){
-            var text=$(this).siblings()[$(this).siblings().length-1].childNodes[0].innerHTML;
+            var text=$(this).siblings()[$(this).siblings().length-1].childNodes[0].innerText;
             const el=document.createElement('textarea');
             el.value=text;document.body.appendChild(el);
             el.select();document.execCommand('copy');
             document.body.removeChild(el);
             alert('copied to clipboard');

Review comment:
       Thanks for the feedback @pabloem and @aromanenko-dev !
   Based on your inputs, Is it ok if I remove both alerts?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org