Recent searches


No recent searches

Inline code formatting in Zendesk communities



Posted Aug 09, 2017

Code blocks are highlighted HTML <pre> blocks in Zendesk community forums posts and comments, but it always comes with a line break.

Would it be possible to support <pre> without a line break (aka inline pre) from Zendesk side? If we copy-paste the inline pre from some other place, it works great, but no way to add it in Zendesk's editor.

Thanks!


13

28

28 comments

As discussed here: https://support.zendesk.com/hc/en-us/community/posts/222554808-Help-Center-Formatting?page=1#community_comment_115005136628

 

You're using a stripped down TinyMCE editor which I like. TinyMCE has a new excellent official code sample plugin.
 
 
The menu item looks like this: Inline image 1
 
Give it a try - it's excellent and it offers syntax highlighting via prism.js
 
It would be a relatively small amount of developer time to implement this on Zendesk Help Center and would be a huge win for Zendesk customers writing articles with code samples.
 

6


+1 Please implement this.

2


+100, this works in support tickets, why can't it work in the help centre

1


+100 Absolutely

1


Yes, definitely. This is blocking us from migrating to help center

1


+1 as this is a major blocker for us using ZD Guide.

0


image avatar

Nicole Saunders

Zendesk Community Manager

Hi all - 

Are you all looking at this functionality specifically for the Community platform, as indicated in the original post, or more broadly for Knowledge Base articles? 

1


For KB articles

0


Sorry, in KB articles. Is there a separate feedback thread for adding code snippets to KB?

0


image avatar

Nicole Saunders

Zendesk Community Manager

Hey Thomas and Maria - 

One solution for how to do this is via Github Gists. How to use them is explained in this Community thread:

Putting code into articles

The appropriate Product Feedback thread for you to add your comments and votes to is this one: 

Help Center article editor needs to support (easy) source code formatting 

0


I am aware of this method. However, this it is labor intensive and really only makes sense for large blocks of code. As a technical company, we use code snippets and 'preformatted' text all throughout our docs. Adding a gist for each one of these is simply a poor use of time. We simply need a button for preformatted, and ideally, one for longer code blocks.

0


Not to be entirely salty here, but how can so much time pass and even the most basic of documentation formatting functionality remain unactivated in TinyMCE, a web-based editor that is WELL KNOWN to support these features? You've got a number of people here who are asking that a minor change is made to the ZD Guides editor interface (count me among them) to surface functionality that TinyMCE offers already! How can you just ignore that? 

Please. I've got a ton of documentation that I need to migrate into ZD and it's gotta be readable and functional, and so far, the less-than-minimal formatting options available just won't cut it. I'm using Gist to get code blocks and there's just NOTHING else!! 

The only reason someone doesn't do something that would benefit others is that NOT doing it benefits them. 

I truly hope that this isn't true. 

0


image avatar

Nicole Saunders

Zendesk Community Manager

Hey Tyler - 

If you're looking for this functionality for Community posts, it is not planned to be implemented. If you're looking for it for Knowledge Base posts, you should contribute to this thread: 

Help Center article editor needs to support (easy) source code formatting 

0


I simply edited the html to add this style to code blocks:

 style="background-color: #eee;border: 1px solid #999;display: block;padding: 20px;"

 

0


Adding my request to this chain. We are setting up developer documentation and the ability to add code blocks would help immensely.

1


image avatar

Nicole Saunders

Zendesk Community Manager

Hi Peter - 

Are you looking for code blocks in your Community or in your Knowledge Base? 

If you're looking for it in the Community, no further developments are planned for the Communities platform. 

If you're looking for it for your Knowledge Base, please contribute to this thread: 

Help Center article editor needs to support (easy) source code formatting 

1


Hi Nicole,

We just migrated our Discourse forum into help center community, we are a technical company and have noticed that we and our customers need code blocks within the community GUI. 

Do you know if there is anything on the roadmap to make community a more robust platform?

0


image avatar

Nicole Saunders

Zendesk Community Manager

Hi Adam -

Yes, there are several things on the roadmap around improving the community. I can't speak to code blocks specifically, but I will check in with the product managers to see if this is something under consideration for the near future.

0


Hi Nicole,


Would also like to request Code Blocks / Inline Code Blocks for the text editor in the Knowledge Base. We're also a tech company and not being able to easily add some inline code block using say ```This``` has become a huge hassle for us.

0


image avatar

Nicole Saunders

Zendesk Community Manager

Thanks for adding your voice and vote to this request, Joakim!

0


image avatar

Kasper Sørensen

Zendesk Product Manager

Hi all,

As of today we have made code blocks available in the community content editor. See the new icon in the toolbar. Here's a code block for ya, which might also help locate the icon :-)

</>

1


That's great news Kasper! Thanks for the update!

0


Thanks for the update, Kasper! It seems that the button just moved from within the "T" submenu to the main toolbar, right? While this is nice and all, you seem to have forgotten to add the new top level button to the "edit" form:


Now, there is no way to add the code format to existing posts. Please fix this.

Thanks, Matthias.

0


Apparently, this has been fixed in the meantime and the code blocks button also appears in the edit dialog. Thanks!

0


Has there been any progress regarding the inline code formatting? It's a shame that this is still not possible with the only (lackluster) workaround being to use LaTeX math mode and specify the "code" in typewriter font to distinguish this from normal text.

\(\texttt{this is not code}\)

this is code

edit: oh, it seems you also still don't support LaTeX/MathJax by default...

1


image avatar

Hiedi Kysther

Zendesk Customer Care

Hi Matthias,
 
I'm afraid that we are currently not able to support this functionality However, I do agree that it would be a nice feature to have, and I'm happy to pass your feedback to our Voice of the Customer team for further discussion.
 
Please feel free to let me know if I can help with anything else!
 
 
Cheers,

0


Just a plus-one to this request. It's been six years since the original request, and it's an extremely common need for technical documentation to be able to have inline code formatting. As others have mentioned, it's notable that it's available in tickets (via markdown, single backticks), but in Help Center, arguably a more formal communication platform where formatting is even more important, this simple functionality is not supported. 

I know we can create a style in our template to support this, but it's *extremely* tedious to have to modify html every time we stick a file or folder name in our documentation, and that comes with the limitation that the formatting wouldn't show up in the WISIWYG editor, only the published article, which is super confusing. 

0


Another vote for this feature.

 

Right now, I'm copying and pasting the inline code formatting from other articles when I need it, but it's a hassle.

1


Please sign in to leave a comment.

Didn't find what you're looking for?

New post