Copy link to clipboard
Copied
I need help with the option to wrap the text in my TOC. I followed the 3 step instructions provided in a previous post but it not only didn't work but it deactivated my TOC links so that you could not expand the books nor could you click into any of the topics.
http://forums.adobe.com/message/3565732
Step 1: In the whthost.js file,
function writeBookItems(nIdx,num)
To swap out the no-break spaces for plain spaces, Search-n-Replace this:
==================================================
function writeBookItems(nIdx,num)
{
var sHTML="";
if(num>0){
var nCIdx=0;
do{
nCIdx++;
var i=nIdx+nCIdx;
var nItemType=getItemType(i);
if(nItemType==1||nItemType==4||nItemType==8){
sHTML+=writeBook(i);
nCIdx+=getItemContentsNum(i);
}
else if(nItemType==2||nItemType==16){
sHTML+=writeAnItem(i);
}
}
while(nCIdx<num);
}
return sHTML;
}
======================================================
with this:
=======================================================
function writeBookItems(nIdx,num)
{
var pattern = /\ \;/g;
var sHTML="";
var newsHTML="";
var softsHTML="";
if(num>0){
var nCIdx=0;
do{
nCIdx++;
var i=nIdx+nCIdx;
var nItemType=getItemType(i);
if(nItemType==1||nItemType==4||nItemType==8){
sHTML+=writeBook(i);
nCIdx+=getItemContentsNum(i);
}
else if(nItemType==2||nItemType==16){
newsHTML=writeAnItem(i);
softsHTML= newsHTML.replace(pattern," "); ///////////////////////// swap it
sHTML+=softsHTML;
}
}
while(nCIdx<num);
}
return sHTML;
}
Step 2: The TocWriteFixedWidth function, change the table to remove the width property,
=======================================================
to this
=======================================================
function TocWriteFixedWidth(bBegin,nWidth)
Removed width property
==================================================
function TocWriteFixedWidth(bBegin,nWidth)
{
if((gbIE4)&&(gbMac)&&(!gbIE5)){
if(bBegin)
document.write("<table width="+nWidth+" border=0><tr><td>");
else
document.write("</td></tr></table>");
}
}
Copy link to clipboard
Copied
Step 3: remove the single <nobr> and </nobr> from the string found in the function WriteAnItem().
Copy link to clipboard
Copied
Hi,
Removing the NOBR tags breaks your TOC. This was something I worked out later on in the thread. Check http://www.wvanweelden.eu/robohelp/webhelp/skinwebhelp/wraptoc for the correct instructions. You can also download a replacement whthost.js for RoboHelp 8.
Please post back if this doesn't help.
Greet,
Willam