Standards and HIVE markdown

in #condenserlast month (edited)

"Standards" by XKCD

Once upon a time, one developer at Steemit inc. decided to add some custom flavors to the the official Markdown syntax. One widely used example is that you can just paste image URLs into the post body, and they will be converted into an img HTML element, automatically.

One can argue that this is a very good usability thing for the end-users, but these kinds of custom flavors come with its own problems. Since users are expecting this behavior in everywhere, other HIVE interfaces also needs to implement the "Condenser flavored Markdown".

And guess what, it's not really modular, so you can't just use it as a package, you need to pull the related parts from the Condenser, manually.

We need a unified "Hive-Flavored-Markdown" package for Javascript (also preferably with other popular programming languages) so that every interface uses a common library to handle the differences.


Seems like abandoned, how do you tackle this problem at Travelfeed?

hive-content-renderer should make the same HTML output as condenser. It's not just a fork. It's a complete code rewrite in javascript.

great news! any updates on the browser version?

It's easy enough to add. I'll probably do it this week.

will be waiting for this :)

Just updated the readme on the git repository with CDN:

Not fully tested but should work.

Abandoned but still working since the Condenser logic didn't change much. I'm currently using steem-content-renderer with some additional tweaks. The bundle-size is quite large though, so I use it on the server-side and save the parsed and sanitised output in our database, on the client-side it's only loaded for the editor preview. The server-side code is here, there's a second package that parses that code to react components

I'm still maintaining full compatibility with Condenser markdown, but the default editor on TravelFeed is a block-based WYSIWYG editor with additional features that are saved as stringified json in html. The json parameter of a div element is parsed out by Condenser, so only the placeholder is shown on Condenser but on TravelFeed the json is parsed instead. For example, that's how it looks like for an image gallery:

<div json='{"type":"imageGallery","data":{"images":[{"url":"","width":4000,"height":2250},{"url":"","width":4000,"height":2250},{"url":"","width":4000,"height":2250},{"url":"","width":4000,"height":2250},{"url":"","width":4000,"height":2250},{"url":"","width":4000,"height":2250},{"url":"","width":4000,"height":2250},{"url":"","width":4000,"height":2250},{"url":"","width":4000,"height":2250},{"url":"","width":4000,"height":2250},{"url":"","width":4000,"height":2250},{"url":"","width":4000,"height":2250},{"url":"","width":4000,"height":2250},{"url":"","width":4000,"height":2250},{"url":"","width":4000,"height":2250},{"url":"","width":4000,"height":2250},{"url":"","width":4000,"height":2250},{"url":"","width":4000,"height":2250},{"url":"","width":4000,"height":2250},{"url":"","width":4000,"height":2250},{"url":"","width":4000,"height":2250}],"style":"masonry"}}'><p><em>Image galleries are not supported by your current frontend. View this post on for the full experience.</em></p><center><img src="" /></center><center><img src="" /></center><center><img src="" /></center><center><img src="" /></center><center><img src="" /></center><center><img src="" /></center><center><img src="" /></center><center><img src="" /></center><center><img src="" /></center><center><img src="" /></center><center><img src="" /></center><center><img src="" /></center><center><img src="" /></center><center><img src="" /></center><center><img src="" /></center><center><img src="" /></center><center><img src="" /></center><center><img src="" /></center><center><img src="" /></center><center><img src="" /></center><center><img src="" /></center></div>

This is very much needed.

We NEED syntax coloring for code.

Indeed! I've been mentioning about it too when someone bring up markdown topic. More options and css options if possible :D

that would be awesome

Adding math text through LaTeX would be a plus too.

a necessity

That is a great idea, and that way when I want something to be added, maybe I can find a developer that can make an update to it, like adding a few more fonts or font size choices.

Hoping these two can be added;

  • More fonts options (size, color, font type)
  • More formula options (math, code, references/bibliography)

We have one here, been using it in Ecency/Esteem for over a year now: