Markdown Mattermost
Markdown makes it easy to format messages. Type a message as you normally would, then use these the following formatting syntax to render the message a specific way. For a guide to using Markdown in Mattermost, see this blog post.
Text Style¶
Enable and use slash commands from within Mattermost. GitLab's advanced formatting system (GitLab Flavored Markdown). Tutorials and walkthroughs. C# - C# MonoDevelop: Invalid -langversion CS1617 c#. Markdown, link previews, avatars etc. He has been investigating Mattermost and set up a test instance in Labs at some point, but this is down now.
You can use either _
or *
around a word or phrase to make it italic, or __
or **
around a word or phrase to make it bold. You can also use common keyboard shortcuts, including CTRL/CMD+B to bold, and CTRL/CMD+I to italicize text.
*italics*
(or_italics_
) renders as italics**bold**
renders as bold***bold-italic***
renders as~~strikethrough~~
renders as
Links¶
Create labeled links by putting the desired text in square brackets []
and the associated link in round brackets ()
.
[CheckoutMattermost!](https://about.mattermost.com/)
Renders as: Check out Mattermost!
Headings¶
Make a heading by typing #
and a space before your title. For smaller headings, use more #
’s.
Renders as:
Alternatively, you can underline the text using equal signs or hyphens ---
to create headings.
Renders as:
Lists¶
Create a list by using asterisks *
, hyphens -
, and/or plus signs +
interchangeably as bullets. Indent bullet points by adding two spaces in front each one.
Renders as:
item one
item two
item two sub-point
Make an ordered list by using numbers instead:
Renders as:
Item one
Item two
Item three
You can also start a list at any number:
Renders as:
The first list number is 4.
The second list number is 5.
The third list number is 6.
Make a task list by including square brackets []
. Mark a task as complete by adding an x
.
Renders as:
Code Block¶
Creating a fixed-width code block is recommended for pasting multi-line blocks of code or other text output because it’s easier to read with fixed-width font alignment. Examples include block text snippets, ASCII tables, and log files.
This can be accomplished by placing three backticks ``` on the line directly above and directly below your code:
Tip
Type three backticks , press SHIFT+ENTER,
<type_your_code>
, press SHIFT+ENTER again, then type three more backticks .
Or by indenting each line by four spaces:
Syntax highlighting
To add syntax highlighting, type the language to be highlighted after the ```
at the beginning of the code block. Mattermost also offers four different code themes (GitHub, Solarized Dark, Solarized Light, and Monokai) that can be changed in Account Settings > Display > Theme > Custom Theme > Center Channel Styles.
Supported languages include:applescript
, as
, atom
, bas
, bash
, boot
, _coffee
, c++
,c
, cake
, cc
, cl2
, clj
, cljc
, cljs
, cljs.hl
,cljscm
, cljx
, cjsx
, cson
, coffee
, cpp
, cs
, csharp
,css
, d
, dart
, dfm
, di
, delphi
, diff
, django
, docker
,dockerfile
, dpr
, erl
, fortran
, freepascal
, fs
, fsharp
,gcode
, gemspec
, go
, groovy
, gyp
, h++
, h
,handlebars
, hbs
, hic
, hpp
, html
, html.handlebars
,html.hbs
, hs
, hx
, iced
, irb
,java
, jinja
, jl
, js
, json
, jsp
, jsx
, kt
,ktm
, kts
, latexcode
, lazarus
, less
, lfm
, lisp
, lpr
,lua
, m
, mak
, matlab
, md
, mk
, mkd
, mkdown
,ml
, mm
, nc
, objc
, obj-c
, osascript
, pas
, pascal
,perl
, pgsql
, php
, php3
, php4
, php5
, php6
, pl
, plist
,podspec
, postgres
, postgresql
, ps
, ps1
, pp
, py
, r
, rb
,rs
, rss
, ruby
, scala
, scm
, scpt
, scss
, sh
, sld
, st
, styl
,sql
, swift
, tex
, texcode
, thor
, ts
, tsx
, v
, vb
, vbnet
, vbs
,veo
, xhtml
, xml
, xsl
, yaml
, and zsh
.
Example:
Renders as:
GitHub Theme
Solarized Dark Theme
Solarized Light Theme
Monokai Theme
In-line Code¶
Create in-line monospaced code text by surrounding it with backticks `
. Don’t use single quotes '
.
Renders as: monospace
.
In-line Images¶
In-line images are images added within lines of text. From Mattermost Server v5.35 and in Mattermost Cloud, you can control whether all in-line images over 100px in height are automatically collapsed or expanded in messages by setting a user preference, or by using the /collapse
and /expand
slash commands.
To add in-line images to text, use an exclamation mark !
followed by the alttext
in square brackets []
, then the imageURL
in round brackets ()
. You can add hover text after the link by placing the text in quotes ''
.
Example:
If the height of the original image is more than 500 pixels, Mattermost sets the image height at 500 pixels and adjusts the width to maintain the original aspect ratio.
You can set the width and height of the displayed image after the URL of the image by using an equals sign =
followed by values for both width and height ##x##
. If you set only the width, Mattermost adjusts the height to maintain the original aspect ratio.
Examples:
In-line image with hover text¶
Renders as:
In-line image with link¶
Note
An extra set of square brackets []
is required around the alt text, and round brackets ()
are required around the image link.
Renders as:
In-line image displayed wtih fixed width and height¶
Example: An in-line image that’s 50 pixels wide and 76 pixels high.
Renders as:
In-line image displayed with fixed width¶
Example: An in-line image that’s 50 pixels wide where the system adjusts the height to maintain the original aspect ratio.
Renders as:
Lines¶
Create a line by using three *
, _
, or -
.
***
Renders as:
Block quotes¶
Create block quotes using >
.
>blockquotes
renders as:
Mattermost Markdown Table
Tables¶
Create a table by placing a dashed line ---
under the header row, then separating each column with using pipes |
. The columns don’t need to line up exactly. Choose how to align table columns by including colons :
within the header row.
Renders as:
Mattermost Markdown Escape
Math Formulas¶
Create formulas by using LaTeX in a latex
Code Block.
Note
This feature is disabled by default. Contact your System Admin to enable this setting in System Console > Site Configuration > Posts to use this feature.
Markdown Matter Most List
Renders as: