Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Storybook API how to render HTML in my AEM component

Avatar

Level 2

I am trying to build XF components guide in our AEM similar to AEM Core component Examples, but I need to render the HTML part from story book  for the same component, and show in my core component examples page. right now OOTB has Properties, Mark up and JSON tabs, i will be added one more tab which says HTML or IFRAME. and then show the html i get from storybook. so wanted to represent how this component gets rendered in real time page. 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

4 Replies

Avatar

Community Advisor

Hi @kedar0910 

You can use clientlibs to write js to fetch, parse and show the HTML in dialog

 

https://developer.adobe.com/experience-manager/reference-materials/6-5/granite-ui/api/jcr_root/libs/... 

Arun Patidar

AEM LinksLinkedIn

Avatar

Level 2

parsing HTML is the second part, how do even get the HTML from story book as my response? 

Avatar

Administrator

@kedar0910 Just checking in, were you able to resolve your issue? We’d love to hear how things worked out. If the suggestions above helped, marking a response as correct can guide others with similar questions. And if you found another solution, feel free to share it, Your insights could really benefit the community. Thanks again for being part of the conversation!



Kautuk Sahni

Avatar

Level 4

You will not be able to fetch HTML as it is from the frontend module (Storybook) into ui.apps directly. Workaround is to fetch the generated clientlibs and parse it to generate required HTML out of it at UI level.