Markdown In Slack

Posted on  by 



Now you can build interactive forms in Slack that do all sorts of things. File a ticket, add assignees, gather feedback, take attendance, and much more.

A simple PHP package for sending messages to Slack, with a focus on ease of use and elegant syntax.
  • A simple PHP package for sending messages to Slack, with a focus on ease of use and elegant syntax.
  • Markdown is a lightweight markup language for creating formatted text using a plain-text editor. John Gruber and Aaron Swartz created Markdown in 2004 as a markup language that is appealing to human readers in its source code form. Markdown is widely used in blogging, instant messaging, online.
  • This integration allows you to create and schedule Flow tasks and quickly loop in your teammates directly from Slack.
2017/02/23 20:50 (dev-master)
GitHub - Packagist
6 258 380
laravel - slack
dev-master
2017/02/23 20:50
  • php >=5.5.0
  • guzzlehttp/guzzle ~6.0|~5.0|~4.0
  • ext-mbstring *
1.7.0
2015/06/03 03:35
  • php >=5.4.0
  • guzzlehttp/guzzle ~6.0|~5.0|~4.0
  • ext-mbstring *
1.6.0
2015/06/02 19:34
  • php >=5.4.0
  • guzzlehttp/guzzle ~6.0|~5.0|~4.0
  • ext-mbstring *
1.5.0
2015/03/16 20:39
  • php >=5.4.0
  • guzzlehttp/guzzle ~5.0|~4.0
  • ext-mbstring *
1.4.0
2015/03/04 18:51
  • php >=5.4.0
  • guzzlehttp/guzzle ~5.0|~4.0
  • ext-mbstring *
1.3.0
2015/02/22 06:09
  • php >=5.4.0
  • guzzlehttp/guzzle ~5.0|~4.0
  • ext-mbstring *
1.2.0
2015/02/13 23:39
Slack
  • php >=5.4.0
  • guzzlehttp/guzzle ~5.0|~4.0
  • ext-mbstring *
1.1.0
2015/02/01 07:24
  • php >=5.4.0
  • guzzlehttp/guzzle ~5.0|~4.0
  • ext-mbstring *
1.0.0
2015/01/09 23:29
  • php >=5.4.0
  • guzzlehttp/guzzle ~5.0|~4.0
  • ext-mbstring *
0.3.0
Markdown in slack
2015/01/06 23:46
  • php >=5.4.0
  • guzzlehttp/guzzle ~5.0|~4.0
  • ext-mbstring *
0.2.2
2014/11/19 19:57
  • php >=5.4.0
  • guzzlehttp/guzzle ~4.0
  • ext-mbstring *
0.2.1
2014/09/26 07:23
  • php >=5.4.0
  • guzzlehttp/guzzle ~4.0
  • ext-mbstring *
0.2.0
2014/09/08 09:19
  • php >=5.4.0
  • guzzlehttp/guzzle ~4.0
  • ext-mbstring *
0.1.1
2014/06/14 00:32
  • php >=5.4.0
  • illuminate/support 4.*
  • guzzlehttp/guzzle ~4.0
0.1.0
2014/05/05 10:03
  • php >=5.3.0
  • illuminate/support 4.1.*
  • guzzlehttp/guzzle ~4.0

Please enable JavaScript to view the comments powered by Disqus.comments powered by Disqus

A simple PHP package for sending messages to Slack with incoming webhooks, focussed on ease-of-use and elegant syntax. Note: this package is no longer being actively maintained.

  • Laravel integration: Slack for Laravel
  • Symfony integration: NexySlackBundle

Requirements

  • PHP 5.5, 5.6, 7.0 or HHVM

Installation

You can install the package using the Composer package manager. You can install it by running this command in your project root:

Then create an incoming webhook on your Slack account for the package to use. You'll need the webhook URL to instantiate the client (or for the configuration file if using Laravel).

Basic Usage

Instantiate the client

Settings

The default settings are pretty good, but you may wish to set up default behaviour for your client to be used for all messages sent. All settings are optional and you don't need to provide any. Where not provided, we'll fallback to what is configured on the webhook integration, which are managed at Slack, or our sensible defaults.

FieldTypeDescription
channelstringThe default channel that messages will be sent to
usernamestringThe default username for your bot
iconstringThe default icon that messages will be sent with, either :emoji: or a URL to an image
link_namesboolWhether names like @regan or #accounting should be linked in the message (defaults to false)
unfurl_linksboolWhether Slack should unfurl text-based URLs (defaults to false)
unfurl_mediaboolWhether Slack should unfurl media-based URLs, like tweets or Youtube videos (defaults to true)
allow_markdownboolWhether markdown should be parsed in messages, or left as plain text (defaults to true)
markdown_in_attachmentsarrayWhich attachment fields should have markdown parsed (defaults to none)

Sending messages

Sending a basic message (preview)

Sending a message to a non-default channel

Sending a message to a user

Sending a message to a channel as a different bot name (preview)

Sending a message with a different icon (preview)

Send an attachment (preview)

Send an attachment with fields (preview)

Send an attachment with an author (preview)

Advanced usage

Markdown

By default, Markdown is enabled for message text, but disabled for attachment fields. This behaviour can be configured in settings, or on the fly:

Send a message enabling or disabling Markdown

Send an attachment specifying which fields should have Markdown enabled

Explicit message creation

For convenience, message objects are created implicitly by calling message methods on the client. We can however do this explicitly to avoid hitting the magic method.

Attachments

When using attachments, the easiest way is to provide an array of data as shown in the examples, which is actually converted to an Attachment object under the hood. You can also attach an Attachment object to the message:

Each attachment field is also an object, an AttachmentField. They can be used as well instead of their data in array form:

You can also set the attachments and fields directly if you have a whole lot of them:

Contributing

If you're having problems, spot a bug, or have a feature suggestion, please log and issue on Github. If you'd like to have a crack yourself, fork the package and make a pull request. Please include tests for any added or changed functionality. If it's a bug, include a regression test.

How do you remove Slack formatting toolbar?

I rarely add formatting to messages, and would rather the chat box in Slack only be a chat box like in Messenger (and like it was before). Instead now it's double as large and has formatting options I'll never use. How can you turn off Slack's formatting options?

Question
What do you think of Slack's new WYSIWYG editor?
Answer
18 points

There's an option to turn it off - Preferences > Advanced > Input Options and toggle 'Format messages with markup'.

Share
a year ago
Choose how you'd like to format messages by going to Preferences > Advanced > Input Options

We recently released a WYSIWYG editor to help you format messages in Slack. To the users who preferred the text markdown from before, we heard you. 🙇

Starting today, you can choose how you’d like to format messages by going to Preferences > Advanced > Input Options. #changelog

14 points
a year ago
There are several ways to disable Slack's rich text editor

If you just want to hide the 'kitchen sink' formatting toolbar, you can disable it as @maguay described below.

Markdown In Slack

If you want to actually move back to the old Markdown-style formatting options, here's how you can do it:

Chrome

If you use Slack in Chrome, this extension will revert the text formatting for you.

Firefox

If you use Slack in Firefox, this extension will revert the text formatting for you.

Desktop

Disabling the new text editor in the desktop app is a bit trickier but totally doable if you're willing to wade into some code. @kfahy outlined these instructions on Github (source):

1) Open the slack app in Developer mode

  • On Mac OS X: export SLACKDEVELOPERMENU=true && open -a /Applications/Slack.app
  • On Windows in a Powershell window (per user install): $env:SLACKDEVELOPERMENU='true'; & '$($env:LOCALAPPDATA)Slackslack.exe'
  • On Windows in a Powershell window (machine wide install): $env:SLACKDEVELOPERMENU='true'; & '$($Env:ProgramFiles)Slack Deploymentslack.exe'
  • On Ubuntu with Gnome (using Slack launcher):edit /usr/share/applications/slack.desktopreplace Exec=/usr/bin/slack %U with Exec=env SLACKDEVELOPERMENU=true /usr/bin/slack %U
  • On other OS's: ensure the SLACKDEVELOPERMENU environment variable is set to true before opening the Slack app.

2) Right-click in the app and Inspect element

3) Copy the contents of index.js

4) Paste into the Console tab

5) Repeat each time you reload slack or switch to a team for the first time

11 points
a year ago
Click the Aa button in the lower right of Slack's chat box

You can't fully disable Slack's formatting options, but you can hide the Slack formatting toolbar. Click the Aa button in the lower right of Slack's chat box, and Slack will hide the toolbar. You can still use keyboard shortcuts to add formatting, or select text to see a hover toolbar with formatting options, but that'll at least save space and keep Slack looking a bit more like it used to.

2 points
Any free/cheap alternatives to Quickbooks Online for invoicing clients?

We currently use Quickbooks Online but the options for invoice customization are limited and the interface is horrendous.We're looking for something that can:- link up with our banking- accept ...

A very basic option I often use and recommend is PayPal. It misses your last option on creating p...3 points
I'm the founder of https://getapollo.io, check it out, if you like it I'll give you lifetime free...3 points
I'm testing out Zoho.com - they have a very affordable package under Zoho Books, check out → http...2 points
What are the advantages of Notion vs Confluence?

I've been using Confluence since 2013, and in my opinion, it's the best document collaboration tool. Lately, I've seen that Notion is getting trendy. Any Notion heavy user around?

Me! There is thread somewhere here from me asking what people were using as alternatives to Confl...17 points
I started looking into Notion as a possible alternative for my personal Evernote. While I did eva...10 points
I use Confluence at work, Notion for personal.I’ve used Notion the odd times for quick/presenta...9 points
Do you keep your personal and work tasks separate, or do you merge them into a to-do list that has everything in one place?

Odds are your team doesn’t use the same tool to manage projects and assign work as you use to manage your personal life. Even your calendar appointments likely live on separate Google Calendars, on...

This is a piece of cake with #Clickup. You can organize your Spaces, Folders, and list to have as...5 points

Markdown In Slacks

We use Basecamp for shared work tasks, but it doesn't really fit well into my personal flow. So I...1 points
We all use GQueues at my company professionally, and I also use the same app personally — with g...1 points

Markdown In Slack Login

We're currently discussing Slack and 894 other software products. Join in the conversations:





Coments are closed