Expand/collapse elements for htmlhelp

Post here questions and problems related to editing and publishing DITA content.
BentCat
Posts: 6
Joined: Wed Sep 13, 2023 9:54 pm

Expand/collapse elements for htmlhelp

Post by BentCat »

Is it possible to publish a htmlhelp (.chm) file with expand/collapse functionality within a topic? I would like to export topics with collapsed text/code blocks/etc. that the user can expand if they're interested in learning more about that subject matter.

As far as I can tell from google this is not an option, but thought that someone here might have workarounds that would make it work.
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Expand/collapse elements for htmlhelp

Post by Radu »

Hi,
I do not know for sure, you can add custom CSS selectors by setting the "args.css" and "args.copy.css" parameters in your transformation scenario, but in general the HTML viewer is quite limited in functionality, I'm not sure if it would allow for embedding and executing Javascript code in the HTMLs and how complex that Javascript could be. There is a transformation parameter named "args.hdf" which can take a value which is used in the header part of all generated HTML files.
It appears it is possible to embed Javascript in the CHM HTMLs:
https://learn.microsoft.com/en-us/previ ... cript-code
So you might have the ingredients to do this but I do not have a clear sequence of steps for you. HTMLHelp is a deprecated technology and we are not investing further in it.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
BentCat
Posts: 6
Joined: Wed Sep 13, 2023 9:54 pm

Re: Expand/collapse elements for htmlhelp

Post by BentCat »

Thanks Radu!
Post Reply