Fork me on GitHub.

Demo

$('textarea').overlay([
    {
        match: /\B@\w+/g,
        css: {
            'background-color': '#d8dfea'
        }
    }
]);

License

MIT