Files
rainbowcroissant/src/tools/feemailformat.md
Kevin Samuel 56de8bbb05 update the plain mail format to look plain (#10)
* move the table out and iframe it in so it's actually plain

* make it a single table with no theads

* make copy button work with iframed table

* taller frame
2023-12-09 12:23:36 +05:30

31 lines
1.0 KiB
Markdown

---
layout: base
title: Fee Mail Format
desc: >
copiable format for mail to COE Office confirming fee payment
details at the EFL University
---
<header class="center">
<h1>Fee Payment Email Format</h1>
<button id="copybtn" disabled="">COPY</button>
<p>that email thing format in a neat table that you can copy to gmail</p>
<p>psst. might not work everywhere. but <b>LONG PRESS</b> and paste. do not pick from keyboard</p>
<div>
<script type="module">
const btn = document.getElementById('copybtn');
const frame = document.querySelector('iframe').contentWindow;
btn.addEventListener("click", ()=> {
frame.getSelection().selectAllChildren(frame.document.querySelector('table'));
frame.document.execCommand('copy');
btn.innerText = 'COPIED!';
btn.disabled = true;
setTimeout(()=>{btn.disabled = false; btn.innerText = 'COPY'},3000)
});
btn.disabled = false;
</script>
</div>
</header>
<iframe src="./plainformat" width="100%" height="600px"></iframe>