Gridsome markdown to HTML?

Hello
I’m trying strapi with gridsome, but I noticed that the formatting I use in the description field (rich text) is not considered when I consume the API in Gridsome, any idea with respect to this problem?
thanks

Hello, how exactly you are trying to render your description field in Gridsome?

No no, it’s just restaurant description, check image please

Richtext(markdown) is not transformed somehow to HTML in API. It remains as markdown.

If you want to render it as HTML take a look at the this example:

https://github.com/strapi/strapi/discussions/5876#discussioncomment-49449

If you don’t want to deal with markdown then you can switch your text editors and start use the ckeditor. Which stores the HTML instead.

thanks i will try this solution (CKEditor)

1 Like

omg not solved, maybe problem is another…now i see this:

By default, Vue outputs the HTML as raw text. In order to output/render real HTML, you will need to use the v-html directive.

<div v-html="restaurant.description"></div>

P.S. Do not skip chapters when learning something(Vue)! :slight_smile: Template syntaxes are explained at the begging of the Vue documentation, in Template Syntax.

2 Likes

thanks i am so stupid!

1 Like