JSFiddle - React, Tailwind, and code Playground
by Rodwyn Moreno
JavaScript
const anchor = '<a target="_blank" href="https://bikerumor.com/wp-content/uploads/2017/09/Ritchey-Break-Away-Carbon-Outback_carbon-break-away-coupler-carbon-travel-gravel-adventure-bike-frameset_riding.jpg">Carbon Road 1</a>';
const stopPropagation = 'onClick={(event: any) => { event.stopPropagation(); }}';
console.log(anchor.replace("<a", `<a ${stopPropagation}`));
// console.log([0] + stopPropagation + anchor.split('<a')[1])