Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

How to add expand/collapse icon in html?

hema36
Kilo Explorer

Hi,

 

In Knowledge Management, while creating an article when I change the article type corresponding template will appear inside the text field. In every template there will be a heading and description below that. For each heading of the article, I need to add expand/collapse icon at the right end so that I can expand/collapse the description below the title. Can anyone help me in doing this in HTML ?

 

Regards,

Hema P

24 REPLIES 24

Manjul,


  I have tried your solution; however, I can't seem to get it to work. I have added the script to the UI Scripts, but I don't think it is loading when I run the knowledge article even though I have made it global. Any help would be greatly appreciated.



Thanks


Hello Manjul,


Is it possible to have it collapsed by default and toggle on click?


Has anyone got this to work?


But how this can be done in Service Portal? This is working in fulfiller view but not in Portal. 😞 

Casper3
Kilo Contributor

Hi Guys,

I have had our IT guys implement the above mentioned solution, so that with I can make a section collapsible with the simple HTML code.

I encounter two problems:

1) After I've inserted the code - users can no longer change the text that is inside the collapsible section

2) It is only possible to make collapsible sections if somebody know how to edit the source code. Is there anyway to highlight a section, press a button and then the system adds the collapsible HTML automatically - so that normal users can use this?