I use RESTful API to get data. After that I use PrismicDOM.RichText.asHtml to render webView content and the result as the image below:
Here is the response data:
{ page: 1, results_per_page: 20, results_size: 1, total_results_size: 1, total_pages: 1, next_page: null, prev_page: null, results: [ { id: 'xxx', uid: null, type: 'xxx', href: 'xxx', tags: [], first_publication_date: 'xxx', last_publication_date: 'xxx', slugs: ['xxx'], linked_documents: [], lang: 'fr-fr', alternate_languages: [], data: { type: 'xxx', published_date: 'xxx', version: 1, conditions: [ { type: 'heading2', text: 'ssss', spans: [] }, { type: 'paragraph', text: '', spans: [] }, { type: 'heading2', text: 'Heading 2', spans: [] }, { type: 'paragraph', text: '', spans: [] }, { type: 'heading3', text: 'Heading 3', spans: [] }, { type: 'paragraph', text: '', spans: [] }, { type: 'paragraph', text: 'Yeah', spans: [ { start: 0, end: 4, type: 'strong' } ] }, { type: 'paragraph', text: '', spans: [] }, { type: 'list-item', text: 'xx', spans: [] }, { type: 'list-item', text: 'x', spans: [] }, { type: 'list-item', text: 'x', spans: [] }, { type: 'list-item', text: 'x', spans: [] } ], changelog: [ { type: 'paragraph', text: 'CHG', spans: [] } ] } } ] }
My code is: