Your post does help in changing icons globally but how to change the share icon in posts only? I do not want to change the link icon in the editor but, only in the posts. I checked the other posts in the forum but none of those work in the current build of Discourse, thus I am asking it here.
Bells is a Pro icon, so it can’t be included, our default FA5 implementation only covers the free icons.
The solid eye icon is a bit of a special case: the FontAwesome 4 eye icon was moved to the regular bundle, so in Discourse we have a matcher for it that converts ‘eye’ to ‘far-eye’. Unfortunately, this stops you from using the solid ‘eye’ icon in Discourse, because Discourse will redirect eye to far-eye. If you absolutely must use that icon, you can copy the svg into a custom icon that you can rename to something of your liking, and add that to a theme or plugin.
If you are familiar with the rails console, I would try logging in to the console and running SvgSprite.expire_cache and then refreshing the page to see if that does it.
I ended up embedding the SVG sprite directly into the Header file, as uploading it and naming it as that article says to do did not work for me (could be operator error, of course).
So my Header is:
<svg width="0" height="0" class="hidden" style="display: none;">
<symbol id="myicon-search" ..... </symbol>
<!-- all of my symbols here... -->
</svg>
<script type="text/discourse-plugin" version="0.8">
api.replaceIcon('search', 'myicon-search');
</script>
And that is easy to manage.
I use the SVG sprite generator at https://svgsprit.es to make sure the format is correct.
I’m trying to do the same thing. I’ve changed the ‘share’ icon successfully in posts but it appears it also changes the ‘link’ icon in the editor. Any ideas how to change just the posts icon?
Is there a way to change a fontawesome icon globally to an SVG icon uploaded in the theme upload section? I am working on a site and would like to specifically change the fontawesome icon for when a topic is solved (using the discourse-solved plugin) to my site’s logo. I am having a hard time approaching this via the actual plugin code and I was wondering if this header method works for something like that.