I find this part of the Discourse interface confusing. In the editor, the link icon is used for inserting a hyperlink (well this makes sense, this is what it should be and is the same as 99% of other interfaces)
But in viewing a post the same icon is used for the link/social sharing
when really I find it makes more sense here to be a more familiar share icon
For a while I used the API approach to change the icon
<script type="text/discourse-plugin" version="0.8"> api.replaceIcon('link', 'external-link-tab'); </script>
But then this changes the icon in the editor, so it does not make sense to use a share icon to represent inserting a hyperlink. It would be helpful if there were separate API calls to reference the two contexts for this button, so I could substitute as a share link icon but not an insert link one.
??? (my knowledge of how discourse internally works is mostly shallow)