I tried to make the codes HTML and text friendly when I could. For example, the remove link code will output <br>'s instead of line breaks (in the optional text) when used in the HTML section of the message. Custom text codes share this property. I see now how this approach limits the benefit of HTML. I will take this into consideration and am already having some excellent ideas, such as an HTML section with the ability to position where the code, a link, etc is placed.
For now you might create 2 custom text message codes, one for text and one for the HTML section of your message. In the HTML code, enable the option "Do not translate line breaks to <br> in HTML messages." so that extra <br>'s are not added to your HTML messages.
Thanks for the great suggestion!