Mattermost, Inc.

How to block quote or code quote an entire following chunk of text without additional markdown demarcation?

Many of our users moving from HipChat to Mattermost are very frustrated with Mattermost in some minor ways, but they’re frustrating nonetheless. In particular they’re missing the /quote and /code functions that accept the entire following chunks of text (paragraphs, whatever with newlines).

Using `…` and ```…``` and > is really nice, but it’s not enough when dealing with large chunks of text where you don’t want to have to insert leading (on each newlines chunk) or ending delimiters.

Is there a way to already do this or can this feature be added for fuller joy for inbound HipChat users?

Could I be missing a Markdown key symbol that already does this?

Hi @ylluminate! Thank you for reaching out.

I was testing this on v5.0 and v5.1 and we do seem to support /code slash command - I’m not sure which version we added this in so you might need to upgrade if you don’t see it on your server. It works the same way as ... - would this be something you are looking for?

There is a feature request open for /quote command and I recommend up-voting it:!

Oh wow, that’s great. Half way there! :smiley: I’ll get it updated.

What will it take to get /quote to work now like this? Can we help add it to the code base?

@ylluminate :slightly_smiling_face:

You can create a custom slash command with the instructions here:

The documentation also includes other information related to slash commands. Here is also another doc related to slash commands in case you’ll ever need it:

1 Like

Thanks @amy.blais! I’m curious, after giving this a good look over, I see it’s definitely robust, but for the creation of a simple slash command that’s essentially nothing more than inserting > before all of the lines of text… this seems like overkill.

Is there a cleaner method for creating a slash command vs having to make a server that processes things for you?

Hey @ylluminate! Absolutely agree that creating an external server to process this would be overkill.

I can see two ways of going about this:

  • Create a command_quote.go based off command_code.go and submit a PR to add this as base functionality. The only point of conflict might be that others could have their own /quote slash command already configured, and this would conflict for them. We’d have to run this by product management to make a decision.
  • Write a server plugin that exposes a /quote in much the same way. We’ve had a long running plugin beta that we’re now in the midst of stabilizing, and anticipate shipping Mattermost 5.2 with some major (but backwards incompatible to the beta) changes to plugins. It would be really easy to implement a /quote using the new framework, effectively hosting the processing on the mattermost server itself vs. having to spin up something else. You could even write a plugin for Mattermost 5.1 and earlier (allowing you to deploy as soon as its ready), and then easily update it once you move to Mattermost 5.2.

I’d definitely be open to supporting you in this effort if you’re willing to keep driving it! Feel free to ping me (@jesse.hallam) on

1 Like