Added "Copy to clipboard" to resume editor page
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
<div>
|
||||
<label asp-for="Content"></label>
|
||||
<textarea asp-for="Content" spellcheck="false"></textarea>
|
||||
<a class="comment" onclick="CopyToClipboard()" href="#">//  Copy to clipboard</a>
|
||||
<span style="display: none" id="copied"> - Done</span><br />
|
||||
<span asp-validation-for="Content" class="text-danger"></span>
|
||||
</div>
|
||||
<br />
|
||||
@@ -34,4 +36,15 @@
|
||||
textarea {
|
||||
min-height: 500px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
async function CopyToClipboard() {
|
||||
text = document.getElementById("Content");
|
||||
text.select();
|
||||
document.execCommand("copy");
|
||||
window.getSelection().removeAllRanges();
|
||||
document.getElementById("copied").style.display = "initial";
|
||||
await delay(3000);
|
||||
document.getElementById("copied").style.display = "none";
|
||||
}
|
||||
</script>
|
||||
@@ -1,4 +1,5 @@
|
||||
function ToggleMenu()
|
||||
const delay = ms => new Promise(res => setTimeout(res, ms));
|
||||
function ToggleMenu()
|
||||
{
|
||||
var menu = document.getElementsByClassName("main-menu")[0];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user