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

Some spacing dropped w/ Highlight enabled

New Here ,
Jan 03, 2008 Jan 03, 2008

Copy link to clipboard

Copied

Wondering if anyone else has encountered this. I'm seeing it in output from RH HTML 7. Note: I do not generate Help with a skin.

1. Generate WebHelp w/ any preferred format (I usually use DHTML > Java Applet > Pure HTML).
2. Select Search tab in Help and search for any string with 'Highlight search results' check box selected.
3. View a topic that contains search hits. Spaces are missing around some (not all) hyperlinked or formatted (e.g., bolded) text in the topic.

The only 'fix' for this I can find is to insert hard spaces in the HTML around all hyperlinked and formatted text. Surely there must be a better way....

Thanks in advance for any ideas.

Views

1.7K

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
Advisor ,
Jan 03, 2008 Jan 03, 2008

Copy link to clipboard

Copied

If "Spaces are missing around some (not all) hyperlinked or formatted (e.g., bolded) text in the topic," it's probably because those spaces are included, or not, within the SPAN tags that determine the formatting.


Good luck,
Leon

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
New Here ,
Jun 04, 2008 Jun 04, 2008

Copy link to clipboard

Copied

We're experiencing the same problem.
1. First, we generate WebHelp with the Highlight Search Result option enabled.
2. Perform a Search.
3. Click on a topic.
Look for the highlighted word. The word after the highlighted word will have a missing space. This occurs only if the highlighted word is formatted (italicized or bolded)
3. Go to the TOC and click on a different topic.
4. Click on the same topic (as in Step 3).
Notice that the highlight is removed (since we are not performing a search) and the missing space is back.
We are able to reproduce this with every project, with or without a skin and in IE (not in Firefox. That's a first!)

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
Participant ,
Jun 05, 2008 Jun 05, 2008

Copy link to clipboard

Copied

This is a bug and we missed fixing it in 7.0.2 patch. I am pasting the fix below, you will have to modify the file "C:\Program Files\Adobe\Adobe RoboHelp 8\RoboHTML\WebHelp5Ext\template_stock\whtopic.js" manually if you wish you take up the fix.

Look for funciton
this.doHighlight = function( a_aRanges, a_nStart )

and replace the entire function body with

this.doHighlight = function( a_aRanges, a_nStart )
{
s_strHlStart = "<font style='color:" + gsTextColor + "; background-color:" + gsBkgndColor + "'>";
s_strHlEnd = "</font>";

if ( a_nStart >= a_aRanges.length )
return a_nStart;

var nEnd = this.getClosedRanges( a_aRanges, a_nStart );
if ( this.aClosedRanges.length == 0 )
return nEnd;
var strText = this.node.data;
var strHTML = "";
var nLastStart = 0;
for ( var i = 0; i < this.aClosedRanges.length; i++ )
{
strHTML += strText.substring( nLastStart, this.aClosedRanges .nStart - this.nFrom );
strHTML += s_strHlStart;
strHTML += strText.substring( this.aClosedRanges
.nStart - this.nFrom,
this.aClosedRanges .nEnd - this.nFrom );
strHTML += s_strHlEnd;

nLastStart = this.aClosedRanges
.nEnd - this.nFrom;
}
strHTML += strText.substr( nLastStart );

var spanElement = document.createElement( "span" );
spanElement.innerHTML = strHTML;
if (gbIE4)
{
//for IE, when assigning string to innerHTML, leading whitespaces are dropped
if ((strHTML.length >0)&&(strHTML.charAt(0) == " "))
spanElement.innerHTML = " " + spanElement.innerHTML ;
}
this.node.parentNode.replaceChild( spanElement, this.node );
if(gnYPos == -1)
{
var elemObj = spanElement;
var curtop = 0;
if (elemObj.offsetParent)
{
while (elemObj.offsetParent)
{
curtop += elemObj.offsetTop
elemObj = elemObj.offsetParent;
}
}
else if (elemObj.y)
curtop += elemObj.y;

gnYPos = curtop;
}
return nEnd;
};

Notice that only following 6 new lines have been added in the modificaiton

if (gbIE4)
{
//for IE, when assigning string to innerHTML, leading whitespaces are dropped
if ((strHTML.length >0)&&(strHTML.charAt(0) == " "))
spanElement.innerHTML = " " + spanElement.innerHTML ;
}

thanks
Vivek
RoboHelp Team.
Adobe Systems.

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
Community Expert ,
Jun 05, 2008 Jun 05, 2008

Copy link to clipboard

Copied

You can download a replacement file from my site.

http://www.grainge.org/pages/authoring/rh7/using_rh7.htm

See item 32.

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
New Here ,
Jun 05, 2008 Jun 05, 2008

Copy link to clipboard

Copied

Thank You!

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
Explorer ,
Jul 23, 2008 Jul 23, 2008

Copy link to clipboard

Copied

I was so excited to find this patch because I'm having a similar problem. Generating FlashHelp with RH7, if I search on 2 words with highlight turned on, they appear fine. But if I add a third word (client error log, for example), the space is missing between the second and third word in the highlighted text. It appears as "client errorlog".

I downloaded the updated whtopic.js from Peter's site (thanks, Peter) and put it in the WebHelp5Ext\template_stock folder (renamed the old one to old_whtopic.js first), and regenerated my FlashHelp, but the result was the same. Then I copied the updated .js file to the template_stock folder under WildFireExt (because I seem to remember putting other FlashHelp fixes there years ago) but that didn't fix the problem either. What am I missing? -- kc

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
Enthusiast ,
Jul 24, 2008 Jul 24, 2008

Copy link to clipboard

Copied

kc,

Did you flush your browser disk cache in between?

Harvey

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
Enthusiast ,
Jul 24, 2008 Jul 24, 2008

Copy link to clipboard

Copied

kc,

Another point:

The RH Search function does not accommodate phrases. This is specifically noted in the RH help topic. Maybe this is irrelevant to the disappearing space issue, but what happens if you enter "client and error and log"?

H

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
Explorer ,
Jul 24, 2008 Jul 24, 2008

Copy link to clipboard

Copied

Thanks for replying, Harvey. As it turns out, this appears to be happening because I have an inline style applied within a Heading 1 and the highlighting feature doesn't handle the <span> tags properly.

In all my Heading 1's for topics describing dialog boxes and tabs, the name of the item had a different color from the nouns that follow. The color was applied as in inline style (selected words in the Heading 1 text and applied a different color font).

For example, in a topic whose Heaing 1 was Client Information dialog box, the words "Client" and "Information" were gold, matching the dialog box title bar. If you searched on client information dialog, the space between information and dialog box was removed in highlighted text. But if the inline style is removed, the space correctly appears in highlighted text.

Here's an example of the a Heading 1 with an inline style applied.

<h1><span style="color: #ffa54f;"><img src="circles_agentGUI.jpg" x-maintain-ratio=TRUE style="border: none; margin-left: 0px; margin-right: 6px; margin-top: 0px; margin-bottom: 3px; width: 73px; height: 49px; border-style: none; float: left; border-style: none; float: left;" width=73 height=49 align=left border=0>Client Information</span> dialog box</h1>

To work around this problem, I created a new Head1 style that applies the different color to the entire heading. That eliminates the extra <span> tags and the highlighted text appears correctly.

Still think the Robo code should allow for the <spans> but the workaround will work for us.


kc

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
Enthusiast ,
Jul 24, 2008 Jul 24, 2008

Copy link to clipboard

Copied

Good sleuthing!

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
Advisor ,
Jul 24, 2008 Jul 24, 2008

Copy link to clipboard

Copied

Indeed, Holmes!

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
Explorer ,
Aug 05, 2008 Aug 05, 2008

Copy link to clipboard

Copied

Well, I guess I spoke too soon. I'm still having issues with the highlighted search results. If the word preceding the highlighted text is bold, the space is missing after the bold text. But it's there in the Robo editor, and preview, and in HTML. The HTML looks like this:

<li class=p><p>Click <span style="font-weight: bold;">Backups</span>
in the left pane of the <b>STORServer Agent Settings</b> dialog box.</p></li>

The missing space in the FlashHelp output is the space after Settings when you search on "dialog box" or just "dialog."

Suggestions, ideas? -- kc

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
Community Expert ,
Aug 05, 2008 Aug 05, 2008

Copy link to clipboard

Copied

See item 32.

http://www.grainge.org/pages/authoring/rh7/using_rh7.htm

Hope that helps.

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
Explorer ,
Aug 05, 2008 Aug 05, 2008

Copy link to clipboard

Copied

I am already using the updated js file, which I downloaded from your site (item 32) before I posted previous messages. :*( -- kc

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
Community Expert ,
Aug 06, 2008 Aug 06, 2008

Copy link to clipboard

Copied

I can only suggest you report this as a bug adding that you have already tried the updated JS file supplied by Adobe. Sorry.

http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

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
Explorer ,
Aug 06, 2008 Aug 06, 2008

Copy link to clipboard

Copied

Done. Thanks for the link, Peter. -- kc

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
Explorer ,
Oct 24, 2008 Oct 24, 2008

Copy link to clipboard

Copied

LATEST
I'm having a similar problem, but in my case entire words are missing when I enable the Highlight toggle. I updated my version of RoboHelp to the latest version and also installed the JS file that Peter provided. I have attached an example of the problem I'm talking about (I hope that works).

Any ideas as to what's going on here? And thanks for any help.

-Al

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