Expand my Community achievements bar.

onClick state argument API- selectedHtml Issue

Avatar

Level 1
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/
Topics

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

4 Replies

Avatar

Level 1

SalmaSh2_0-1750933743136.pngSalmaSh2_1-1750933760529.png

Reference screenshots

Avatar

Community Advisor

Hi @SalmaSh2 ,

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


Thanks

Avatar

Level 1

Hi @MukeshYadav_ , 

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

Avatar

Administrator

@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