So I made my site using Prismic/GraphQL and Gridsome. And I got the query working, only that when rendering the strings to the rendered string shows where only spaces would go.
Im using v-html to render the string. I even tried to format it but it seems to me like im missing something?
<p v-for="(p, index) in $page.prismicio.post.edges[0].node.content" :key="index" v-html="p.text" />
My graphQl is just the basic variant:
<page-query>
query Post ($uid: String!) {
prismicio {
post: allNewss(uid: $uid) {
edges {
node {
_meta {
id
uid
}
title
date
description
content
image
}
}
}
}
}
</page-query>
And this is part what is output in grahQL explorer:
"content": [
{
"type": "paragraph",
"text": "Lectus hendrerit curae nostra.",
"spans": []
},
...
but the actual output is this:
Lectus hendrerit curae nostra.
hello
"). Try v-text or use “Mustache” syntax. Works fine to me (witout primisic) - maybe this Q is relevant: https://stackoverflow.com/questions/30877491/display-unescaped-html-in-vue-js – Ezra Siton Mar 04 '20 at 13:29