Solution 1 :

It can be made with JavaScript with function replace():

function onTextareaInput() {
 document.getElementById("textarea").value = document.getElementById("textarea").value.replace("hc", "hollycrap");
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>Testtt</title>
</head>
<body>
    <textarea id="textarea" oninput="onTextareaInput()"></textarea>
</body>
</html>

Problem :

I have a text area that I would like to be able to autocomplete pre-defined terms. So for example, if a user types “hc” it will autocomplete to “hollycrap”?

Comments

Comment posted by pawello2222

Please add tags specifying the language/frameworks/etc.

Comment posted by How to Ask

Read

By