Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

67
Views
Copiar imagen como hipervínculo HTML a través del portapapeles no funciona en MacOS

Copiar al portapapeles funciona bien en PC con Windows en el navegador Google Chrome, pero no funciona con MacOS en el navegador Google Chrome dentro del editor Wyswig de herramientas de marketing por correo electrónico como Snovio.

Aquí está mi código:

 let htmlBlock = `<a style="padding: 10px 0px; max-width: 360px;" href="https://commons.wikimedia.org/wiki/Category:Images#/media/File:Volkswagen_Beetle_7.jpg" alt="Car Image"> <img height="168" width="300" src="https://commons.wikimedia.org/wiki/Category:Images#/media/File:Volkswagen_Beetle_7.jpg" alt="Car Image" /></a>` copyToClipboard(htmlBlock); function copyToClipboard(element) { // Create container for the HTML // [1] let html = element var container = document.createElement('div') container.innerHTML = html // Hide element // [2] container.style.position = 'fixed' container.style.pointerEvents = 'none' container.style.opacity = 0 // Detect all style sheets of the page var activeSheets = Array.prototype.slice.call(document.styleSheets) .filter(function (sheet) { return !sheet.disabled }) // Mount the container to the DOM to make `contentWindow` available // [3] document.body.appendChild(container) // Copy to clipboard // [4] window.getSelection().removeAllRanges() var range = document.createRange() range.selectNode(container) window.getSelection().addRange(range) // [5.1] document.execCommand('copy') // [5.2] for (var i = 0; i < activeSheets.length; i++) activeSheets[i].disabled = true // [5.3] document.execCommand('copy') // [5.4] for (var i = 0; i < activeSheets.length; i++) activeSheets[i].disabled = false // Remove the container // [6] document.body.removeChild(container) }

El mismo código también funciona con el editor de Gmail en MacOS.

¿Alguna idea de lo que me podría estar perdiendo o podría ser muy específico de la plataforma Snovio?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!