onClick state argument API- selectedHtml Issue | Community
Skip to main content
New Participant
June 26, 2025

onClick state argument API- selectedHtml Issue

  • June 26, 2025
  • 3 replies
  • 442 views
Hi, We are working on Content Fragment Editor extension. Using onClick state argument API, When we try to log the state. selectedHtml is returning only text not in HTML format. Please give some suggestion on this if anyone faced same issue. Reference:https://developer.adobe.com/uix/docs/services/aem-cf-editor/api/rte-toolbar/

3 replies

kautuk_sahni
Employee
July 9, 2025

@salmash2 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
MukeshYadav_
New Participant
June 30, 2025

Hi @salmash2 ,

To get the html content we need to call state.html method as mentioned in doc


Thanks

SalmaSh2Author
New Participant
June 30, 2025

Hi @mukeshyadav_ , 

state.html is providing the full html of field, it is not providing the html of only selected Text.

SalmaSh2Author
New Participant
June 26, 2025

Reference screenshots