Formatting text with Markdown

Markdown is a simple markup language you can use to easily add formatting, links, and images to plain text. In Zendesk, Markdown is available in the following places:

  • Ticket comments (from the agent interface)
  • Macros
  • Agent signatures
  • Help Center community posts and comments

In Help Center, Markdown is enabled by default. For agents to use Markdown in other places, an administrator has to enable it in your Zendesk account. For more information, see Enabling Markdown.

Note: Markdown is not available in email.

Topics covered in this article:

You can also watch this short video.

Using Markdown in a Ticket (01:41)

Adding Markdown to text

The following table shows examples of how you can use Markdown to add common formatting.

Note: These examples demonstrate one way you can add certain formatting. There might also be additional ways you can achieve the same formatting. There are also many more formatting options you can add with Markdown. For more options and information, see the complete Markdown syntax documentation.
Table 1. Examples of Markdown syntax
FormattingEntered textPublished text
Bold This is how you **bold** text.
Italics This is how you *italicize* text.
Bulleted lists * Bullet one (don't forget a space after the asterisk)

* Bullet two

Numbered lists 1. Step one

2. Step two

Nested lists * This is the first level of this list.

* To make a second level, add two spaces before the asterisk or number.

Note: You can add things like images, quote blocks, or links to a nested list in addition to just text.
Headings # Heading level one (with a space after the #)

## Heading level two

### Heading level three

 

Note: You can add up to six heading levels.
Block quotes

> Block quotes have to start and end with a blank line

> And each line of the quote starts with a right angle bracket and a space

 

Inline code Here is some `inline code.`
Code blocks ```

This is a code block.

```

Note: Creating a blank line and then indenting the next line or lines with four spaces creates a code block too.
Images ![Optional alternative text if image doesn't load](http://www.sampleurl.com/logo.png)

Community tip! Evan shares a simple tip in our forums for embedding an image that's not hosted.

Links [Link display text](http://www.sampleurl.com)
Images that are also links [![alt text](imageurl)](linkurl)
Horizontal rule line

 

---

Note: You must type a line break before and after the hyphens.

 

Previewing Markdown in ticket comments

When you use Markdown in a ticket comment, you can preview your formatting before submitting the comment. You enter your comment with Markdown formatting, like in the example below.

Then, click Preview to view how your ticket comment will look when posted.

Have more questions? Submit a request

Comments

  • Avatar
    Jonathan March

    There should be a link to this article (or equivalent) next to the Preview link for this ticket.

  • Avatar
    Jonathan March

    Preview mode has a bug in Chrome (not Firefox) on OSX: when the comment is rendered for preview, the spacing between paragraphs is not shown. The actual final (not previewed) comment seems to be rendered ok.

  • Avatar
    Jake Holman

    @Jonathan: Thanks, known issue. Interestingly if you click on the preview, it magically fixes itself. We'll look into what's causing it.

  • Avatar
    Than Raskul

    Markdown is awesome! We have enabled this on our account, but it seems that links in comments lost the "target="_blank" attribute, which used to be the default for links on Zendesk.

    Our agents are quite used to just left-click on a link and gets a new tab, so I'm wondering if there's a way to turn this back on?

  • Avatar
    Jim

    I have just realized that despite seeing the "Preview" button on numerous images and screenshots I do not see it on my own zendesk.

     

    When I type a reply there is nothing there for preview, am I missing an option?

  • Avatar
    Jake Holman

    @Than: Woah, that's not right. Is this happening in the "Classic" agent interface?

    @Jim: We should probably make this clearer in this article, but take a look at https://support.zendesk.com/entries/22610681 and make sure you've got Markdown enabled.

  • Avatar
    Jim

    @Jake: I checked out that article first thing and that lead me here and is why I am confused.

    I have turned on Markdown for agents in Settings>Tickets but I am not seeing the option for Enable Modern Template in the Channels>Email templates section.

    You can see what I am seeing in the screenshot below.

    http://dl.dropbox.com/u/10158027/ScreenCaps/nogo.png

  • Avatar
    Joe

    Hi Jim,

    I actually just checked your account and it appears markdown is enabled. You should see it on the left side of the comment box in Classic Zendesk, or on the right side in the new Zendesk.

    Here are some screenshots from your account:

    Screen_Shot_2013-01-18_at_6.01.44_PM.png Screen_Shot_2013-01-18_at_6.01.52_PM.png

    Screen_Shot_2013-01-18_at_6.02.41_PM.png Screen_Shot_2013-01-18_at_6.02.47_PM.png

    If you're still not seeing it please submit a ticket so we can help out. You can just email support@zendesk.com to do this.

    Best regards,

    Joe

  • Avatar
    Joe

    Jim: In regards to your last comment, I believe your account is new enough that you only have the modern email template. The previous one was eliminated for all new users and is only in existence for users who signed up when it was the default.

    I hope this clears things up. Let us know if you have any further questions or problems.

  • Avatar
    Jim

    @Joseph: thanks for the screenshots and the info about having a new account, makes sense that I would not have the option to turn it on since it should be on by default.

     

    As for the "Preview", on the screenshots i see what you are seeing, but here is what I am seeing.

    http://dl.dropbox.com/u/10158027/ScreenCaps/new-ticket.png

    http://dl.dropbox.com/u/10158027/ScreenCaps/ticket-response-nothing.png

  • Avatar
    Jim

    The clarify I am using Chrome on Windows 7 64 bit, the only installed extension is Lastpass.

  • Avatar
    Jim

    Interesting, I am now seeing the Write Preview links.

  • Avatar
    Ryan Munsch

    This is great thank you for adding this. I do have one question. Is it possible to use Markup in the user registration, welcome, or verification  email?  Currently the content of those emails are, correct me if I'm wrong, limited to basic text and LTM variables (That is the dynamic content it refers to correct?) .   If i could apply Markup to those emails it would go a long way to helping end users actually find and click on the registration link, etc.   

  • Avatar
    Joe

    @Jim: Sorry for the delayed response, it is likely your browser was caching the old code and needed a refresh. Glad it is working now.

    @Ryan: Markdown is currently only supported in tickets. Jake may be able to speak to the possibility of using it elsewhere in the future, and may be able to address your question about LTM variables as you lost me there. This is dynamic content in a Zendesk context: https://support.zendesk.com/entries/20720458-providing-multiple-language-support-with-dynamic-content

  • Avatar
    Than Raskul

    @Jake - Yep, Zendesk Classic (pronto.zendesk.com)

  • Avatar
    Cory Brown

    This is cool.

    There are some times when text is formatted in a ticket and why don't know how it got that way. Our agent doen't remember adding the extra hash tags or something. Is there a way to see what the original ticked looked like before it was marked down?

  • Avatar
    Justin

    Unfortunately not, Cory. The preview option is the best way to see how the ticket will look. Shoot an email to support@zendesk.com if you're consistently getting markdown errors and we'll take a look at the tickets. 

  • Avatar
    Kevin Hill

    <ol> and <ul> are reversed in this forum post. The Markdown examples are correct, but the example of what it gets rendered as have the tags swapped.

    In other words, asterisks, plus signs and hyphens DO produce an unordered list, which is the <ul> tag. Numbered lists get the <ol> tag.

  • Avatar
    Justin

    Thanks for pointing that out, Kevin! 

  • Avatar
    Michael Fromin

    I find it odd that I can't put HTML code inside of code blocks and have them show up.  Our product is sold to web developers so they often want code examples of how to do something.  If I use something simple like:

    This is a paragraph with a bit of <strong>CODE</strong> in it. 

    In Zendesk the strong tags are not shown - they are evaluated.  I would not expect this behavior inside Zendesk.  Is this a purposeful behavior?

  • Avatar
    Jake Holman

    @Michael: You're seeing that behavior inside a ticket?

  • Avatar
    Cory Brown

    @Justin. No worries. We found one that isn't listed here. An underlined word makes it a heading:

     

    Dude

    _

     

    would be an h2.

     

    Which I see now is listed here: http://daringfireball.net/projects/markdown/syntax#header

    Cheers!

  • Avatar
    Michael Fromin

    @Jake - Yes I am.  Classic Zendesk.  In my example from my first comment I end up seeing the word CODE in a bolder font  in a code block but the text of the tags is not visible.   Here are pics of what a small example look like in the Zendesk UI vs a markdown editor...

  • Avatar
    Anton Liaskovskyi

    Hello guys, 

    Is there any chance to use markdown for customers (non agents)?

  • Avatar
    Kevin Hill

    I'm also having the same problem as Michael, where HTML tags are not getting auto-escaped inside code blocks. The only way to work around it is to manually escape the angle brackets (with &gt; and &lt;), which Markdown should be doing

  • Avatar
    Michael Fromin

    @Kevin - Zendesk support tells me this is a Preview problem and that if you actually submit the update things are correct.  My response to them was that won't work for me as I can't "submit and hope" that the note I am sending to my customer is correct.  We sell software and we often work with developers so the precise formatting of our tickets can be important.  

    Hopefully this will be fixed soon as I really was looking forward to the ability to use Markdown and more precisely format case notes. 

  • Avatar
    Kevin Hill

    @Michael: That makes sense. Looks like my manual escaping actually came through as < and > in a recent comment in my Zendesk, so sounds like you are correct and that "workaround" I mentioned shouldn't be used.

  • Avatar
    Jennifer Rowe

    Michael, thanks for sharing the update!

  • Avatar
    Jake Holman

    Hey everyone, sorry about the preview bug in Classic. That's now resolved so that HTML should no longer actually resolve when previewing.

    It turned out this was introduced due to a change in the underlying API which returns the preview for Markdown. We'd found a bug where it wasn't possible to do  [I'm a linkwith a code snippet](www.zendesk.com) as this would output as I'm a link <code>with a code snippet</code> - so as a result of fixing the issue you all saw, that edge case of nesting markdown syntax won't be operational for a little while, but we'll be attempting to fix in the very near future.

  • Avatar
    Allen Lai

    I'd be curious to understand the reasoning for choosing markdown vs. normal rich text formatting, such as forums posts.

Please sign in to leave a comment.