If I understand your question correctly, out of the box, it is not possible to add custom code automatically to one’s post.
If this is the main issue you are facing that is making you want to add the code, then check out the authorized extensions site settings in your site: yoursite.com/admin/site_settings/category/all_results?filter=authorized%20extensions
