Refrence CMS in custom div attrbute

By JS. But anyway no way to solve this without extra element (Embed code with span and four data-src sound the most minimal her).

Maybe try this trick

$(".cms-card").wrap("<div data-src="hello" data-width="100" data-lorem="ipsum"></div>");

If this idea could work for you - its should take ± 10 minutes to convert this idea to loop throw all cms items (Update me).


Maybe you find some idea her (More complex example):
(In this example i convert youtube id to code - the concept/steps should be the same±. And first try to create this by codepen (Copy-paste the html from webflow)