close

Filter

loading table of contents...

CoreMedia Content Cloud v11 Upgrade Guide / Version 2110

Table Of Contents

6.13.4 Optimized Rendering of Embedded Content in Richtext

When embedding content (especially images) in richtext, asRichtextEmbed templates are likely to break HTML validity by rendering <div> blocks inside the richtext's <p> context. So far, the Blueprint's PDivUntanglingFilter tried to be smart and adjust the HTML accordingly by closing and reopening the <p> context around an embedded object. However, this magic never really matched projects' expectations about the result, because it sometimes led to unwanted additional paragraphs or empty links.

Therefore, CoreMedia removed the p/div adjusting features from the PDivUntanglingFilter and leaves it to the asRichtextEmbed templates to provide HTML fragments that are suitable to be used within a <p> context. Consequently, the PDivUntanglingFilter has been renamed to EmbeddingFilter.

If the old PDivUntanglingFilter is useful for you, you can keep it in your project code, and also preserve the LinkEmbedFilter and ImageFilter classes in their old versions.

The following templates in the example bricks and themes are changed:

  • CMTeasable.asRichtextEmbed.ftl closes and opens the <p> elements before and after the include manually.

  • CMPictureasRichtextEmbed.ftl changed from <div> to <span>.

  • CMPicture.media.ftl uses the <picture> element for the responsive container instead of a <div>.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.