adobe / aem-react-editable-components

SPA React Editable Components for Adobe Experience Manager
Apache License 2.0
61 stars 28 forks source link

Provide support no component decoration - aemNoDecoration #74

Closed schoudry closed 3 years ago

schoudry commented 3 years ago

Is your feature request related to a problem? Please describe. React spa libraries do not have support for omitting component decoration. In AEM server side rendering eg. using HTL, the component decoration (default is "div") can be skipped by setting cq:NoDecoration=false in component properties

https://experienceleague.adobe.com/docs/experience-manager-65/developing/components/decoration-tag.html?lang=en

Describe the solution you'd like Adding a property aemNoDecoration=true at the component level (and making it available in model.json) should be respected by the SPA lib and not add div (or other block) wrapper, when NOT in editor mode isInEditor=false...

Describe alternatives you've considered The following work around implemented in project code was manipulate the DOM causing performance implications...

useEffect(() => {
    jQuery(current).unwrap();
});

Additional context image

schoudry commented 3 years ago

feature implemented