How to have topic toolbar print button expand all first

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
TR Lisa
Sr. Propeller Head
Posts: 100
Joined: Thu Jul 06, 2017 8:09 am

How to have topic toolbar print button expand all first

Post by TR Lisa »

HTML5 output. I need the Print icon on the topic toolbar to expand all drop-down text before printing. I don't think it's friendly to make users click Expand All and then Print. And who wants to print a collapsed topic. Can this be done and if so how please? Shamelessly begging for a fast solution as I'm in the weeds on a huge project. Thank you!
Psider
Propellus Maximus
Posts: 816
Joined: Wed Jul 06, 2011 1:32 am

Re: How to have topic toolbar print button expand all first

Post by Psider »

You could try adding a print media definition. The method will probably depend on your project, but on a quick test of a trial output for tripane (without access to a copy of Flare any more), this displayed all the dropdown blocks in my sample topic when printing. I don't know what else 'data-mc-target-name' might be used for though (possibly could be used for the toc in top or side nav?), so your mileage may vary.

@media print {
div[data-mc-target-name] {
display: block!important;
opacity: 1!important;
}
}

The output code was like:
<h3 id="heading" data-magellan-target...>...</h3>
<div style="opacity:0;display:none;" data-mc-target-name="t1">...</div>

The h3 in this case is the text you click to display the dropdown. The div contains the dropdown text.

Use your browser developer tools to check what your output looks like and what might be unique properties you can target to force the hidden text to display.
TR Lisa
Sr. Propeller Head
Posts: 100
Joined: Thu Jul 06, 2017 8:09 am

Re: How to have topic toolbar print button expand all first

Post by TR Lisa »

That's all pretty far above my head, but I will try to digest and apply it later when my brain isn't so fragmented from this day. Thanks!
Psider wrote:You could try adding a print media definition. The method will probably depend on your project, but on a quick test of a trial output for tripane (without access to a copy of Flare any more), this displayed all the dropdown blocks in my sample topic when printing. I don't know what else 'data-mc-target-name' might be used for though (possibly could be used for the toc in top or side nav?), so your mileage may vary.

@media print {
div[data-mc-target-name] {
display: block!important;
opacity: 1!important;
}
}

The output code was like:
<h3 id="heading" data-magellan-target...>...</h3>
<div style="opacity:0;display:none;" data-mc-target-name="t1">...</div>

The h3 in this case is the text you click to display the dropdown. The div contains the dropdown text.

Use your browser developer tools to check what your output looks like and what might be unique properties you can target to force the hidden text to display.
Psider
Propellus Maximus
Posts: 816
Joined: Wed Jul 06, 2011 1:32 am

Re: How to have topic toolbar print button expand all first

Post by Psider »

It's possible you can change the dropdown style using the stylesheet editor, but I don't have it available to check. Using my imagination, the process would be something like open the stylesheet and switch to the print medium. Find the dropdown style. At this point you should see 'display' set to 'none'. Change it to 'block'. But I don't know if it's that simple.
Post Reply