steemit / steem-js

Steem.js the official JavaScript library for Steem blockchain
https://www.npmjs.com/package/steem
MIT License
472 stars 222 forks source link

Displaying/Parsing/Rendering Post Body #356

Open dancherb opened 6 years ago

dancherb commented 6 years ago

Expected behavior

I should be able to use a HTMLView or markdown-render module to display the post content.

Actual behavior

Pictures don't show up, html or markdown text shows up in the post body. Approaching it either as HTML or markdown doesn't work (maybe a mix of both would?)

How to reproduce

Take a post body from the API. Try running it through either of these:

import Markdown from "react-native-easy-markdown";
import HTMLView from 'react-native-htmlview';

<Markdown>
    {item.body}
</Markdown>  

<HTMLView value={item.body}/>

Markdown view:

markdownview

HTML view:

htmlview

What is your method - does the body use a special format/protocol that I should be aware of? Thanks!

dancherb commented 6 years ago

I've also had a go at rendering the post content on a website with Remarkable JS. Here's the result:

remarkable

HajaSharifJ commented 6 years ago

I also faced same problem finally this guy helped me. Try this https://junn.in/archives/690