kontent-ai / delivery-sdk-net

Kontent.ai Delivery .NET SDK
https://www.nuget.org/packages/Kontent.Ai.Delivery
MIT License
32 stars 42 forks source link

Feat: Improve RichText element rendering experience #231

Open Enngage opened 4 years ago

Enngage commented 4 years ago

SDK currently enables developers to choose either IRichTextContent or string in strongly typed models. There are situations where a combination of both needs to be used.

One possible solution would be to extend IRichTextContent with additional properties (e.g. modular_content, links and other properties from response) as well as methods for resolving HTML using registered inline resolvers (e.g. override ToString methods for IRichTextContent and potentially also individual IRichTextBlock blocks)

petrsvihlik commented 4 years ago

another place I know of where such functionality could be useful: https://github.com/alanta/Kontent.Statiq/blob/ee3b64f9f7e25ccd589b7d3328e04fd7d2043e0c/Kontent.Statiq.Tests/PipelineExecutionHelpers.cs#L32 (ping @alanta)

we need to do a spike first to find out what approach shall we take