Suresh Bollipo avatar image
Suresh Bollipo asked Phong Vu answered

Is there a certain library available that is used to convert Mini Markdown to HTML in Team Messaging?


I am trying to implement rich text to the messages presented on my app's frontend (bold, italic, strikethrough, increase/decrease indent, bulleted/numbered list) by converting message body text received through RingCentral into html strings.

I am receiving message text in a tweaked type of Markdown in my get requests, which I see is called Mini Markdown made by RingCentral.

These message strings are very tricky to convert into HTML using typical libraries for that, such as markdown-it, marked, showdown etc. because of the specific deviations from Markdown conventions in these message body strings I'm receiving through RingCentral API. I get a lot of bugs and have to customise logic in most rich text scenarios.

For example, a bulleted list whose indentation is increased by the 'Increase indent' button in RingCentral app looks like this:screenshot-2023-04-11-at-25758-pm.png

It is presented like this in message body when fetching messages:


Markdown-to-HTML libraries can't convert this to a bulleted list, because the 4 spaces that represent the 'Increase indent', that come before the '*' symbol, mean that these items can't be converted to bulleted list items, as the syntax doesn't align with Markdown specifications that all markdown-to-HTML libraries use. The '*' symbol has to come first for a substring after '\n\ to be converted to a bulleted list item.

There are numerous issues of this type.

So, my question is, is there perhaps an approach/library that does this work more simply, that RingCentral maybe itself uses?

ringcentral apprest api
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Phong Vu avatar image
Phong Vu answered

Sorry but I don't think that RingCentral has a lib to convert this. At lease I have never heard about such a conversion need. I don't see many style formats so you can check and implement it for your need.

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys