Closed kination closed 5 years ago
This package is designed to be used automatically by the Delivery SDK, and shouldn't really be created manually. If for whatever reason you still want to use this library standalone, you need to provide an instance of Contentful\Core\Api\LinkResolverInterface
, which is responsible for converting a Contentful\Core\Api\Link
object (a Contentful link) into an actual resource. You can check the Delivery SDK implementation for reference: https://github.com/contentful/contentful.php/blob/master/src/LinkResolver.php
Cheers,
Davide
@dborsatto Then when is it instanciated without parameters in the README file?
Cause for confusion here.
I'm currently looking for a formatter from your rawRich array to HTML but using the whole "Core" is impossible as we're not using that library to fetch data from Contentful because of architectural reasons.
Do you have a Snapshot that would allow us to use the RichText as a standalone library since it is separated from the "Core" by design?
Hey @getrealtec ,
@dborsatto no longer maintains this library. The readme should've been updated, since we had previous confusion - I'm sorry, that's on me.
On using this library stand-alone, we don't really support this use-case. That being said, simply implementing the link resolver interface to resolve to your types would be an option (see here for an example on how it's used). You'd still need to import Contentful/Core
by dependency, but you wouldn't need to use it in any way.
Hello, I caught an error when calling parser and renderer for RichText
My code is:
What parameter do I have to put on
Parser
constructor?Thanks.