Template:Print-Button: Difference between revisions

From Hauck LabWiki
Jump to navigation Jump to search
Created page with "<div class="print-export-buttons" style="float: right; margin: 10px 0; padding: 10px; border: 1px solid #ddd; background: #f8f9fa; border-radius: 3px;"> <strong>📄 Export:</strong><br> <button onclick="window.print()" style="padding: 5px 10px; margin: 2px; background: #0645ad; color: white; border: none; cursor: pointer; border-radius: 3px;"> 🖨️ Drucken/PDF </button><br> <button onclick="copyContent()" style="padding: 5px 10px; margin: 2px; background:..."
 
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div class="print-export-buttons" style="float: right; margin: 10px 0; padding: 10px; border: 1px solid #ddd; background: #f8f9fa; border-radius: 3px;">
<div style="float: right; margin: 5px; padding: 5px; border: 1px solid #ccc; background: #f9f9f9; font-size: 11px;">
  <strong>📄 Export:</strong><br>
'''📄 Export:''' Strg+P (PDF) | Strg+A+C (Kopieren)
  <button onclick="window.print()" style="padding: 5px 10px; margin: 2px; background: #0645ad; color: white; border: none; cursor: pointer; border-radius: 3px;">
    🖨️ Drucken/PDF
  </button><br>
  <button onclick="copyContent()" style="padding: 5px 10px; margin: 2px; background: #00af89; color: white; border: none; cursor: pointer; border-radius: 3px;">
    📋 Text kopieren
  </button>
</div>
</div>
<script>
function copyContent() {
  const content = document.getElementById('mw-content-text');
  const textContent = content.innerText;
  navigator.clipboard.writeText(textContent).then(function() {
    alert('Seiteninhalt wurde kopiert! Sie können ihn jetzt in Word einfügen.');
  }).catch(function() {
    alert('Kopieren fehlgeschlagen. Bitte manuell mit Strg+A und Strg+C kopieren.');
  });
}
</script>

Latest revision as of 15:56, 29 May 2025

📄 Export: Strg+P (PDF) | Strg+A+C (Kopieren)