Closed benpaullamb closed 3 years ago
Hi @benpaullamb which version are you using?
Hi @tolgap, I'm using 2.0.0
I get the same thing on version 1.1.5
@benpaullamb Could you paste the document
object that you are providing to the contentful-rich-text-vue-renderer
? I might've missed a use-case for rendering marks that I am unaware of.
Apologies, I've found the solution. It isn't related to your contentful-rich-text-vue-renderer
. Some pre-existing code was converting the object that contained the bold text to a string and passing it as the 4th argument to the render function (h
). Removing that and first passing the object through the next
function solves the issue.
Hi,
When I make something bold or italic in a Contentful rich text block, and pass the data through the
contentful-rich-text-vue-renderer
, it's rendered as,[object Object],
as shown in the image below.Using a render mark object with a property like this:
[MARKS.BOLD]: (text, key, h) => h('strong', { key }, text),
and passing that to the renderer through themark-renderers
prop still results in the same output of,[object Object],
. Logging inside of that render mark property shows that it is getting called with the correct text.