Is there a way to access the text content of a textarea and swap the two characters around the cursor using Javascript? I am interested in creating a Chrome extension that will allow me to quickly correct typos in Gmail. (I am assuming that the main editing area in Gmail is a textarea).
I understand this may seem like a simple question, but I have been unable to find a solution on my own. While I am not a seasoned programmer, I have successfully written code snippets in other scripting languages to accomplish similar tasks. Despite this, I am struggling with implementing it in Javascript specifically.