Skip to main content
Participating Frequently
August 5, 2014
Answered

How to insert a meta tag in the head element in htm topic files?

  • August 5, 2014
  • 2 replies
  • 2486 views

(I am using RoboHelp 9, but have also tried RoboHelp 11 with exactly the same results.)

Our application requires the WebBrowser control to run in IE9 compatibility mode. This means that when launching help (chm) the help viewer will also use IE9 compatibility mode as it is running in the same process. As Chm files are meant to be viewed in IE7 compatibility mode, this causes various issues with the layout of the help topics.  We have found that to fix this problem each topic needs the following meta tag in the head element:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

As our help system consists of several thousand htm/topic files, we can obviously not do this manually. So in order to have this automatically inserted, I need to edit the mother file that generates the topic files. I have tried to find this file, but no luck. Does anybody know how to do this?

This topic has been closed for replies.
Correct answer Peter Grainge

Willam may not be available right now but I can suggest another method. Find a tag that is in all your topics, maybe </head> and use that as a Find.

Replace with your tag followed by </head>

Backup first.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

2 replies

Captiv8r
Legend
August 5, 2014

Hi there

Unfortunately, there is no "mother file" as you are thinking. With RoboHelp, you simply create as many topic files as you want. As you create them, they remain as created.

You might want to contact Willam VanWeelden and see if you could contract with him to create a script in RoboHelp that would do what you need. I believe you can contact him via his web site.

http://www.wvanweelden.eu/

Cheers... Rick

Peter Grainge
Community Expert
Peter GraingeCommunity ExpertCorrect answer
Community Expert
August 5, 2014

Willam may not be available right now but I can suggest another method. Find a tag that is in all your topics, maybe </head> and use that as a Find.

Replace with your tag followed by </head>

Backup first.


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.
ragnhildeAuthor
Participating Frequently
August 6, 2014

The basic HTML code is hard coded inside the application so can't be changed.


Hmm...I was afraid of that. I guess that just leaves me with the search/replace option. But I can't imagine I'm the only one who has this problem, so I think it would be a good idea for Adobe to include an IE compatibility option in future versions (maybe under Tools/Options/General/Generation?) It should be a fairly easy fix. I think I will wait a couple of days and then submit a Feature Request about this.

RoboColum_n_
Legend
August 5, 2014

Create a Master Page, add the meta tag to its HTML code and apply the Master Page to your topics before compiling.

ragnhildeAuthor
Participating Frequently
August 5, 2014

Thank you for your quick answer. I actually tried this yesterday, but it did not work. It seems to me that everything outside the Body tag in the master page is stripped away when the chm files are generated. I tried it again just now, just to double check. (I also entered the meta tag manually in one of the topics, and this came out fine.) So I still think the best way would be to edit the mother file that generates the head element in the HTM files. Is there a way to do this?