News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Is there a certain library available that is used to convert Mini Markdown to HTML in Team Messaging?
Tags: ringcentral app, rest api
Apr 11, 2023 at 5:02am   •   1 replies  •  0 likes
Suresh Bollipo

Hello,

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:

screenshot-2023-04-11-at-30244-pm.png



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?

1 Answer
answered on Apr 11, 2023 at 11:00am  

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.


 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us