• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Remove DHTML effect with script

Community Beginner ,
Feb 13, 2017 Feb 13, 2017

Copy link to clipboard

Copied

I need to remove DHTML effect (Expandable Collapsible text) from over 100s of topics from multiple RoboHelp projects without losing the content added by applying these effects. Can anyone please suggest a script that I can run to bring all the content in plain HTML?

Views

291

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 13, 2017 Feb 13, 2017

Copy link to clipboard

Copied

To be honest I think an automated method has as many problems as it solves. Let me explain.

I had some text Company cars and I applied the default expanding text to Company. This is how it presents.

<p><?rh-expandspot_start class="expandspot" href="javascript:TextPopup(this)"

                        id="a1" dataid="POPUP568011979" ?>Company<?rh-expandspot_end ?><?rh-expandtext_start

class="expandtext" id="POPUP568011979" style="display: none;" ?>Type your

expanding text here.<?rh-expandtext_end ?> cars

First lets see how that would appear if you could strip out all that is in red.

Company Type your expanding text here cars. -  Would your expanding text make sense if you did that? If not, then a manual removal would be required. Were it not for the fact that you require to keep the expanding text, it would be as simple as right clicking on the hotspot and selecting Remove Expanding Text. As it is, you would need to first get the expanding text onto the clipboard.

Turning to how to remove the code, the last of the three parts in red would be a simple find and replace. The other two have the ID which differs for every hotspot. That would need a regular expression written. Maybe you have a developer who could help if you don't have that skill.

Maybe this could be scripted and the person to approach would be Willam van Weelden but it may well be a chargeable script.

What are your thoughts taking into account the issues above?


See www.grainge.org for RoboHelp and Authoring information

@petergrainge

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 14, 2017 Feb 14, 2017

Copy link to clipboard

Copied

LATEST

You could create a script that goes through the topics. But if you're up to regular expressions, that may be much simpler to implement. RoboHelp's find and replace pod supports them out of the box.

But please: Make a backup first!

@Peter: Is there something to keep in mind when using regex in RoboHelp?

Some expressions you can use. They're really simple, but this is easier than trying to make it complicated.

For the start of the expression: (<\?rh-expandspot_start)[^\?]{1,}(\?>)

For the end of the expression: (<\?rh-expandspot_end)[^\?]{1,}(\?>)

For the expanding text start tag: (<\?rh-expandtext_start)[^\?]{1,}(\?>)

For the expanding text end tag: (<\?rh-expandtext_end)[^\?]{1,}(\?>)

After you run it, run Tools > Update DHTML to clean out any leftover JavaScript or leftover HTML. You can use regular expressions for the JavaScript cleanup as well, but that becomes complicated fast, because that does more than expanding hotspots. The Update DHTML fixes it as well.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp