putting code into articles?

Respondida

15 Comentários

  • Andrea Saez

    Hello,

    What do you mean by 'code snippets' ?

    Technically you can add a code snippet to anything, whether it's to the actual source code of the article or as a <code></code>

    Keep in mind the community doesn't have the ability to accept code at the moment, so it is all plain text.

    Hope that helps!

    0
  • Tobias Raub

    We had the same problem due to the pretty limited formatting options the KB editor offers but solved this particular issue by using public Github Gists, which look much better than the <code> inline code or the ones possible by using <pre>. Gists come with colour coding, line numbering and inline formatting.

    You might have to register with Github for a free account in order to be able to create public Gists that can't be deleted by anyone but you though I'm not sure about that. Could be that creating them anonymously is sufficient.

    (there used to be a link to an example in our Help Centre here but we moved away from Zendesk so the sample link lead to a 404 page, which is why I removed it). Adding Github Gists to Zendesk articles still works as described here, also see additional comments further down in the conversation. 

    2
  • Jessie Schutz
    Zendesk team member

    Thanks for sharing this solution, Tobias!

    0
  • Peter

    Wonderful workaround. Thanks Tobias!!

    0
  • Pete Holborow

    @Tobias Raub.

     

    I realise that this thread is an older one now but I'm trying to get embedded gists working in our Guide setup, the page you linked into available anymore, are you still using this workaround?

    0
  • Tobias Raub

    We're not using Zendesk anymore, sorry. Maybe someone from the Community Team here can provide a hint of what could be going wrong in your case.

    0
  • Pete Holborow

    Looks like we figured it out, we had to check a box in the security settings to display unsafe content which stops the scripts being edited out by the editor.

    Might not be the topic for this thread but I'd be interested to know why you moved from Zendesk and what to.

    0
  • Jason

    When I click on the link in the post by Tobias above, I get this returned:

     

    UH OH. THAT PAGE DOESN’T EXIST.

    That page isn’t here anymore

    Try searching for your answerOr just send us a message

    0
  • Jessie Schutz
    Zendesk team member

    Hey Jason!

    It looks like that doc is on ChipClamps Help Center and they've archived or deleted it. Their Support Team might be able to redirect you though.

    1
  • Tobias Raub

    As mentioned, we're not using the Zendesk Help Centre anymore, the URLs in our Help Centre therefore changed. I removed the link from my original comment above. Adding Github Gists to Zendesk articles still works though, maybe Pete can include a link to one of his sample articles to his comment above.

    0
  • Pete Holborow

    Although Gists do work (and look pretty great in my opinion) we can't use them as Github don't allow Gists to be saved against an organisation, only an individual, and we have multiple people contributing to our help articles.

    The search continues! We are likely to have to edit the raw HTML and use custom styling to get something even half decent.

    Zendesk, why can't we just have the ticket editor in the Guide editor at the very least? I am trying to make the case for the business to swap into Guide because the rest of the functionality is awesome but this is making it a really hard sell with the technical teams).

    0
  • ganesh chand

    @Pete - This is precisely why we stopped using ZD KB. 

    0
  • Jason

    We resorted to taking screen captures of our code and just pasting the images in the articles. Below is an example.

    0
  • Shirley Frid

    This topic is still very much relevant in 2018  - Zendesk are you listening? 

    We just want to be able to paste code snippets in our articles.. and that they look as code should look. JS, JSON or HTML.. that's so common now and used in every product. 

    those gist maneuvers.. are not fun. 

    0
  • Nicole S.
    Zendesk Community Team

    Hi Shirley - 

    We are here and listening. I encourage you to add your voice and vote to this thread in the Product Feedback Community, in order to get it in front of the Product Managers. 

    1

Publicação fechada para comentários.

Powered by Zendesk