Lekhoniya lekhoniya.com Subham Mandal Dhupguri ONE Code ONE ssss web West Bengal India Bangla writing pad Bengali type লেখনীয়া
লেখনীয়া
progarammed by Subham Mandal

Clearspace Utility on Lekhoniya - In-depth Guide

 

Clearspace Utility on Lekhoniya - In-depth Guide

Introduction

Subham Mandal has introduced a handy utility named Clearspace on Lekhoniya, enabling users to quickly clear the content within the editable span using a key combination. This guide will walk you through the functionality and usage of the Clearspace utility.

Overview of Clearspace Utility

The Clearspace utility is designed to provide users with a convenient way to clear the content within the editable span on Lekhoniya. By pressing the "Escape" key a certain number of times in quick succession, users can trigger the clearing action. This serves as a safety measure to prevent accidental content deletion.

Code Explanation

var clearspace = 0; 

document.addEventListener("keydown", function(event) {
  if (event.code === "Escape") { clearspace += 1; }
});

document.addEventListener("keyup", function(event) {
  if (event.code === "Escape") {
    if (clearspace > 50) {
      const editableSpan = document.getElementById("editableSpan");
      editableSpan.textContent = "";
      alert("Lekhoniya: Cleared!");
    }
    clearspace = 0; 
  }
});

Usage Instructions

  1. Trigger Clearspace:

    • Press and hold the "Escape" key multiple times in quick succession.
  2. Clear Content:

    • If the "Escape" key is pressed more than 50 times quickly, the content within the editable span will be cleared.
    • A confirmation alert, "Lekhoniya: Cleared!" will be displayed.

Additional Tips

  • Use the Clearspace utility with caution to avoid unintentional content deletion.
  • Customize the threshold (currently set to 50) based on your preference by adjusting the clearspace variable.

Conclusion

The Clearspace utility adds a practical feature to Lekhoniya, offering users a quick and controlled method to clear the editable span content. For any inquiries, feedback, or assistance, feel free to connect with Subham Mandal. Happy writing and exploring on Lekhoniya!