Skip to main content
Inspiring
August 2, 2011
Question

HTML comments not showing up in snippets in RH9?

  • August 2, 2011
  • 2 replies
  • 942 views

I want to be able to add some HTML comments sometimes when I enter content.

For example, let's say I want a pair of HTML comments like so, with a place for text between them.

<!-- begin info pulled from the v3 P & P manual -->

and

<!-- end info pulled  from the v3 P & P manual -->

I created a snippet, entering the following using HTML view:

<!-- begin info pulled  from the v3 P & P manual -->

<p>Copy the text in here.</p>

<!-- end info pulled  from the v3 P & P manual -->

When I dragged the snippet onto the topic, though, the HTML comments (lines 1 and 3 in the example) were missing. That was the whole point of the snippet: To be able to copy in the HTML comment lines.

I can open the snippet in HTML view, copy the lines, and paste them into the HTML view of the topic, of course, but I'm going to be leaving this project after it's over and don't want to have my successor pulling his/her head out wondering how to get this to work.

Suggestions?

This topic has been closed for replies.

2 replies

Peter Grainge
Community Expert
Community Expert
August 3, 2011

Wouldn't your successor see the item is a snippet and look at the code of that?


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
MM_ActonAuthor
Inspiring
August 3, 2011

Peter, it wasn't even showing up, so no, the person wouldn't be able to tell. I'm going to give the conditional text solution a try and see how that works out.

Peter Grainge
Community Expert
Community Expert
August 4, 2011

No comment is going to appear in Design View, regardless of whether it is in a snippet, an ordinary topic or any page being edited in any HTML editor's design view. That's the whole point of comments, they are something that only appear in the HTML view.

Maybe you were hoping the content of the snippet appeared in topics rather than just the reference?

Anyway, I am sure Amebr's excellent alternative approach will work for you.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
Community Expert
August 3, 2011

We use a conditional tag that is excluded from all outputs for documentation notes. We call it DocoNotes rather than exclude, to distinguish it from other 'stuff' we just don't want to include yet.

The benefit is that the writer can see the comment without going into the HTML view.

Amebr

MM_ActonAuthor
Inspiring
August 3, 2011

Amebr,

I think your solution will work. Instead of worrying about an HTML comment showing up, I just enter it as regular text and then use a condition to hide it, just as I would in Framemaker. (The last time I designed help from the ground up in RH, conditional text wasn't available, so I keep forgetting about it.)

I would need two snippets-- one for the start of the quote and one for the end-- but I think this will work.

Community Expert
August 4, 2011

Good luck. Hope it's a workable solution for you.