I have an HTML string to display in WebView. I need add an event in each tag to get an event on click. My HTML:
<at id="user-01">Jonh</at> in group <at id="group-02">Android</at>
How I can use a regex to add the event
onclick="clickMention(this.id)"
in each tag at
of this.
I want a result like:
<at onclick="clickMention(this.id)" id="user-01">Jonh</at> in group <at onclick="clickMention(this.id)" id="group-02">Android</at>
or:
<at id="user-01" onclick="clickMention(this.id)" >Jonh</at> in group <at id="group-02" onclick="clickMention(this.id)">Android</at>