Choose your preferred language Select the language you understand

Premium Blogger Text Box + Copy Button + Dark/Light Mode

Download Free
0

নিচে শুধু কপি করার জন্য Copy Box দিলাম


<style>
.copybox{
  background:#0f172a;
  color:#ffffff;
  padding:15px;
  border-radius:10px;
  position:relative;
  font-family:Consolas,monospace;
}

.copybox pre{
  margin:0;
  white-space:pre-wrap;
  word-break:break-word;
  font-size:14px;
  line-height:1.7;
  max-height:450px;
  overflow:auto;
}

.copybtn{
  position:absolute;
  top:10px;
  right:10px;
  background:#22c55e;
  color:#000;
  border:none;
  padding:6px 14px;
  border-radius:6px;
  cursor:pointer;
  font-size:13px;
}
</style>

<div class="copybox" id="copyBox">
  <button class="copybtn" onclick="copyText()">Copy</button>
  <pre id="copyText">
এখানে আপনার 190000+ টেক্সট বসান...
  </pre>
</div>

<script>
function copyText(){
  let text = document.getElementById("copyText").innerText;
  let temp = document.createElement("textarea");
  temp.value = text;
  document.body.appendChild(temp);
  temp.select();
  document.execCommand("copy");
  document.body.removeChild(temp);
  document.querySelector(".copybtn").innerHTML="Copied!";
  setTimeout(()=>{
    document.querySelector(".copybtn").innerHTML="Copy";
  },1500);
}
</script>

  
Tags

Post a Comment

0 Comments

Post a Comment (0)

#buttons=(Ok, Go it!) #days=(20)

Our website uses cookies to enhance your experience. Check Now
Ok, Go it!