Expand/collapse text

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
Carl
Posts: 83
Joined: Fri Oct 19, 2018 2:19 am

Expand/collapse text

Post by Carl » Thu Jun 13, 2019 9:48 pm

Is there an easy way to hide a block of text so that you can reveal/collapse it by clicking a link? This was easy to do in Flare, but I've gone in circles trying to find out how to do this in OxygenXML.

sorin_carbunaru
Posts: 326
Joined: Mon May 09, 2016 9:37 am

Re: Expand/collapse text

Post by sorin_carbunaru » Fri Jun 14, 2019 10:52 am

Hello Carl,

Are you asking about the text from the editing area (Text page or Author page) or about the text in the published output (for example WebHelp)?

Best wishes,
Sorin Carbunaru
oXygen XML

Carl
Posts: 83
Joined: Fri Oct 19, 2018 2:19 am

Re: Expand/collapse text

Post by Carl » Wed Jun 19, 2019 8:07 pm

Hello. I am asking about text in the WebHelp output.

ionela
Posts: 342
Joined: Mon Dec 05, 2011 6:08 pm

Re: Expand/collapse text

Post by ionela » Fri Jun 21, 2019 10:45 am

Hi,

In the WebHelp Responsive output we have implemented for the expand/collapse feature. Our implementation is targeted on components that have a title. The title will act as a toggle button and it will always remain visible while the rest of the component will be collapsed/expanded. The expand-collapse widget is rendered before the title. The expand-collapsed state will actually be toggled by clicking only on this widget (not on the title's text).

We have 4 categories of components that match this pattern:
  • nested topics (to have nested topics you need to set chunk="to-content" attribute on the parent topic
  • sections that have a title
  • tables that have a title
  • index terms groups

Here is an example from our user-manual with a topic that contains collapsible elements:Publishing Template Package Contents

Regards,
Ionela
Ionela Istodor
oXygen XML Editor and Author Support

syed
Posts: 66
Joined: Tue Nov 14, 2017 8:34 pm

Re: Expand/collapse text

Post by syed » Thu Mar 05, 2020 1:56 pm

Hi,

Can you tell me what needs to be done to make any other element like Note and Table collapsible?

Thanks..
Syed

Costin
Posts: 705
Joined: Mon Dec 05, 2011 6:04 pm

Re: Expand/collapse text

Post by Costin » Thu Mar 05, 2020 5:07 pm

Hi,

The support that we have implemented in WebHelp for the expand/collapse functionality is not extensible, so it is not possible to have expand/collapse functionality also for notes and all tables, by default.

However, even if I could not tell exactly how that should look like, probably you could achieve that through your own Javascript customization.
For more details on how to include JavaScript code into custom HTML fragments that could be used to customize the WebHelp Responsive output, see this section from the User-Guide.

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support

Post Reply