
With the development of instant messaging applications, users gradually became more and more demanding - at first they had little opportunity to simply send text, but they wanted to exchange files, then the function of accessing the message history from any device appeared, and the storage volume increased.
With all the variety of new features that are available in modern messengers, not all of them allow you to properly format the text, for the sake of which they were originally sent. In the course of working on the
Kato project, we decided to pay more attention to this aspect.
')
Problem
Much of the instant messengers (when we started working on Kato were the majority of these) for one reason or another does not give users ample opportunities for the design of the text - most often you can diversify it with links, emoticons and emoji, but no more.
At the same time, the distribution of instant messengers led to the fact that they were also used for business communications, which imply greater structured information. In this situation, the inability to create a banal list right in the message body is a problem for the user.
If you compare the situation with the email, then the email wins, because any popular email client can format the text beautifully, and not just insert emoticons and attach files.
Since we
do not consider email to be an ideal tool for business communication and we want to create a product that would be better suited for this, it was decided to introduce into the Kato messenger more advanced text formatting options.
Using Markdown
The best solution to the problem at the first stage was the introduction of Markdown markup support by John Gruber and Aaron Schwarz to the instant messenger. This solution has its drawbacks:
- This is a simplified, but markup language, and you need to deal with it, which immediately makes it unsuitable for a large number of ordinary users.
- Markdown documentation is frankly bad - this led to the emergence of third-party and better structured implementations (the creators of one of them called Standard Markdown, John Gruber, even complained and demanded to rename the project so that its secondary nature was visible).
However, there are also big advantages, the main of which is the possibility of writing much more complex and richly decorated messages than before. In addition, Markdown is still simpler than the markup and commands of some other services ...
The number of Kato users who use
Markdown in their daily work is already 20% and is constantly increasing, and, according to their reviews, they don’t want to return to communication in the “text only” mode.
Since the markup mode cannot be called the most requested feature for regular users, by default it is disabled. Markdown is included in the message input window (that the mode is activated, the corresponding mark is displayed under the input field):

You can also turn on Markdown mode by default.
After that, the user can write operators to create lists, bold or italics, insert images, and so on (we have a separate
article about the most popular operators):

In addition, it is possible to view the original Markdown code
messages sent to the chat - to do this, click on the “sleepers” on the left side of the message in the history and click on the Markdown icon:

In the future, we plan to implement a visual editor in Kato that would allow the user to format messages without the need to enter commands (most likely, user actions will be automatically translated into the Markdown markup).
Messenger for programmers
Text formatting is a common problem, but for people who work with a program code and use messengers, there is another difficulty - copying the code and inserting it later. Many services (for example, Skype or HipChat) "spoil" the code - interpret the combination of brackets and colons as emoticons, and when you try to use the code copied from the message, it is no longer compiled.
When using these general-purpose chat services, we have repeatedly encountered this problem, so Kato decided to correct the situation. As a result, another message typing
mode was created, which (like Markdown) is activated separately and allows users to exchange code.

Small pieces of code can be inserted directly into the current line and with the help of the same Markdown (special quotes are used for this, located on the keyboard under the “tilde” symbol):

In the code insertion mode, its small pieces in the chat are displayed in its entirety:

Larger sections are displayed using the 'paste' link - a click on it opens a separate window where the code is highlighted:


Kato users appreciated the possibilities of using Markdown and pasting code and thank them for their implementation.
That's all for today. In the next article we will talk about a document that nobody reads, but which is very important - the privacy policy of the messenger and who, when and how gets access to the story.