Hopefully someone can point out where my mistake is. I\'m trying to implement a fairly simple (I thought) character substitution in a rich text editor (react-rte). The aim i