Copy link to clipboard
Copied
I have upgraded a project from classic RoboHelp 2019 to RoboHelp 2020, and I would like to take advantage of the new cross-reference feature. Is there an easy way to convert thousands of hyperlinks into cross-reference links? I've found that I can fairly easily edit the HTML to create cross-reference links to topic titles. But really I would prefer to have cross-references to heading text. Those HTML edits are not working correctly, however. When I change an existing hyperlink to the desired cross-reference as shown below, RoboHelp magically erases the entire link, like so: <p class="RelatedTopics" dir="ltr"> </p>
Existing hyperlink:
<p class="RelatedTopics" dir="ltr"><a href="Parking_tools.htm#XREF_56756_Parking_Area_Tools">Parking tools</a></p>
Desired cross-reference:
<p class="RelatedTopics" dir="ltr"><a data-xref="{text}" href="Parking_tools.htm">Parking tools</a></p>
It looks like you can't just change the links to cross references in the html because part of the Insert XRef process creates id values against the selected page element in the destination topic.
So for example, say you have Destination_Topic.htm that looks like this.
<h1>Destination Topic</he>
<p>This is my destination paragraph.</p>
In Random_Topic.htm you add a cross reference to the paragraph in Destination_Topic.htm.
Now Destination_Topic.htm looks like this:
<h1>Destination Topic</
...Copy link to clipboard
Copied
You can write a script to do it but you will need to have someone with JavaScript expertise. VariableConverter or GlossaryTermConverter samples can be used as the base.
Copy link to clipboard
Copied
It looks like you can't just change the links to cross references in the html because part of the Insert XRef process creates id values against the selected page element in the destination topic.
So for example, say you have Destination_Topic.htm that looks like this.
<h1>Destination Topic</he>
<p>This is my destination paragraph.</p>
In Random_Topic.htm you add a cross reference to the paragraph in Destination_Topic.htm.
Now Destination_Topic.htm looks like this:
<h1>Destination Topic</h1>
<p id="p">This is my destination paragraph.</p>
@Vivek Kumar Is there an updated scripting guide for RH2020? The link on the website is broken and seems to still point to the RH2019 one (the 2019 one should still be available for people who haven't updated at this time, though)
Copy link to clipboard
Copied
We haven't added any new API in 2020 so 2019 guide is still very much relevant. Having said that updated guide should be available. I will get this done. We do plan to work on newer APIs in update 5 and onwards, we will share details as they become available.
Copy link to clipboard
Copied
Thanks! This is very helpful, but I don't have a JavaScript expert at my disposal at the moment. If someone at Adobe wanted to make a nice conversion script, I'd be happy to test it for you, haha. I'm sure a lot of customers would be interested in such a thing.
Copy link to clipboard
Copied
You can request features and report issues here: https://tracker.adobe.com/
Include the link to this thread in the request so staff can have a look as well. And post the tracker ID here so other forum visitors can vote on it.
(I feel like there might need to be a dedicated function for programmatically creating cross references, as well as a script for non-developers 🙂 , given that inserting an xref updates both the source topic and destination topic.)
Copy link to clipboard
Copied
The problem I am seeing with scripting a conversion is there are multiple types of cross reference, see the dialog for setting up a cross reference. How would a script be able to configure that?
I'm no developer but it looks like a blocker.
________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information
Copy link to clipboard
Copied
I have just started using RoboHelp 2020, so all of my links are hyperlinks to headings currently. Maybe I'll use some of the fancy cross-references in my next release, haha. The feature request Bug Id is RH-9019, if you wanna vote for it. (Please do!) Thanks, everyone.