Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Alexander Gräf 25 posts 131 karma points
    Jan 20, 2021 @ 19:03
    Alexander Gräf

    Macro preview removing style attributes

    Partial view macros as seen as previews in the grid editor lack a number of elements, but especially the style attribute is gone. I have already succeeded in styling the macro preview by injecting CSS via a plugin, but on certain elements, missing the style attribute really hinders proper preview:

    <div class="map-placement">
        <a href="#company_1698" style="left:47.0149373%;top:70.22433800%;">Name</a>
        <a href="#contact_1715" style="left:25.493138%;top:72.37247728%;">Name</a>
        <a href="#contact_1713" style="left:5.6275065%;top:49.39669536%;">Name</a>
        <img src="/media/yjigdvz2/map.svg" />

    In this case, the placement of the markers is completely removed, and the only work-around I could think of, by reading a data-xx attribute in CSS has zero browser support right now.

    Is it possible to configure Umbraco not to remove the style attribute in macro previews?

Please Sign in or register to post replies

Write your reply to: