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

Wrap Text TOC

New Here ,
Jun 03, 2011 Jun 03, 2011

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 = /\&nbsp\;/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>");
}
}

Views

584

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
New Here ,
Jun 03, 2011 Jun 03, 2011

Copy link to clipboard

Copied

Step 3: remove the single <nobr> and </nobr> from the string found in the function WriteAnItem().


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 ,
Jun 06, 2011 Jun 06, 2011

Copy link to clipboard

Copied

LATEST

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

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