Template code cannot be inserted into the HTML editor, it has to be specifically in our PHTML templates (Pages templates, blocks, theme templates, etc...) to execute that.
Theoretically, I suppose, you could create a custom PHP block with your advertisement custom location template code in it and then use the external embed code in your article.
Here a guide on using blocks "externally", it will generate a Javascript code and HTML for you to embed where you want it:
Alternatively, an approach which is a little more rigid but would automatically insert it into your articles, would be to include it in your Pages template for records.
For something easier, I would suggest making your suggestion in our Feature Suggestion forum.