jquery write protection in textarea for wildcards
- by Juri
Hi everybody.
Does anyone know a possibilty to protect a string-wildcard from changing in a textarea?
HTML:
<textarea name="mail_text" id="mail_text">
{salutation} {recipient},
thanks for your email.
Regards
{username}
</textarea>
I would like to catch when someone tries to change one of the wildcards: {salutation},*{recipient}* and {username}
$("textarea").keyup(function() {
var val = $(this).val();
//protect the wildcards
});
Thanks!