Is there a way to use glyphicons in Help Center Articles or Titles?

8 Comments

  • Wes Drury

    @Jonathan - I wrote some code not too long ago for someone.  I'll need to track down all the pieces.  I'm using font awesome for the icons so you will need to add the below code in your Document Head:

    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
    

    Here is the code that you need.
    https://gist.github.com/moderatorwes/9f20dabd77e4257887a9

    When creating an article add the word Video and my code will look for the word video and replace it with an icon.  Just let me know if you need further help.

    0
  • Jonathan Semones

    Wes, that is Great!

    Now i just need to make some time to implement this.

    0
  • Jonathan Semones

    Worked like a charm!

    Is there a reason you used two different classes in the css to differentiate between decoration and size instead of just using one that inherits those?

     

    For anybody else trying this:

    the .js targets the 'header.article-header', but for me the section that I needed to target for an article was the 'header.knowledge-page-header'.

    0
  • Wes Drury

    @Jonathan - Glad to hear it worked.  I don't remember the reason but I'm sure it was something unique for that particular user. Feel free to edit the script any way that you like and if inherit works for you then all the better.  Best of luck.

    0
  • Justin Hamilton

    @Wes, very nice solution there, but just wanted to note, for those looking to replace multiple occurrences of a string within one section (such as within an article body), you may want to use a global regular expression (/g). Otherwise, you'll end up replacing only the first occurrence of the string.

    0
  • Jean de Dieu Ndayisaba

    Hello,

     

    Im trying to do this with categories but Im not able to find any information on it? Will I be able to use code you have shared for catergories?

    0
  • Rich Herbert

    I can't seem to get this to work. Am I missing something or perhaps this code is outdated? 

    0
  • Nicole - Community Manager

    Hey Rich - 

    The post is about 3 years old, so it's possible that it's out of date. Can you provide any additional detail on the trouble you're having? 

    0

Please sign in to leave a comment.

Powered by Zendesk