prismicio / prismic-react

React components and hooks to fetch and present Prismic content
https://prismic.io/docs/technologies/homepage-reactjs
Apache License 2.0
154 stars 40 forks source link

richText.render() outputs   #12

Closed tylermcrobert closed 4 years ago

tylermcrobert commented 5 years ago

I'm using richText.render() and it works perfectly, however, it renders out   as text.

hypervillain commented 5 years ago

Hey @tylermcrobert I'm unable to reproduce, could you give me more information?

vuquanghoang commented 4 years ago

I also got the same issue. I tried to type text into CMS and then get content by this code: <RichTextContainer>{RichText.render(slice.primary.content)}</RichTextContainer>;

All of the spaces turned into  . Not sure you guys know about it at this moment?

hypervillain commented 4 years ago

Hey @vuquanghoang,

do you know which version this happens with? I will try to reproduce on my side. Is there any specific content in your rich text (videos, embeds...)?

acd02 commented 4 years ago

~Hello, I got the same issue here,~

prismic-reactjs version: "1.1.1"

Render:


image

Data:


data

PS: actually, it was due to the fact that the text was wrongly formatted when I copied/pasted it inside the prismic text editor...😅

hypervillain commented 4 years ago

Hey @acd02, so your post-scriptum means that everything is fine on our side? I actually tried and pasted non-breaking spaces in my Rich text editor and could not reproduce your use case either 🤔

acd02 commented 4 years ago

Yes, problem solved on my side :)

I actually tried and pasted non-breaking spaces in my Rich text editor and could not reproduce your use case either

weird indeed 🤔