Closed surfinzap closed 3 years ago
@surfinzap You have to implement the richTextResolver for that and make sure you insert the image as a component (so you might also need to create a new content model for that):
@Domitnator thanks! That's exactly how I worked around it. But from the perspective of content editor, it is an unnecessary step I have to teach them. That's why it would be better to be able to write own resolver for images.
This feature is available in the next version of the SDK as can be demonstrated by following test (https://github.com/Kentico/kontent-delivery-sdk-js/blob/vnext/test/browser/isolated-tests/resolvers/browser-rich-text-resolver/browser-rich-resolver-html-priority.spec.ts#L29)
Motivation
This is how Image is resolved in Rich-text element today:
For our project we need to render image in the following way:
Proposed solution
Ideally, I would able to extend resolver for an image su supply my desired HTML markup.