Copy link to clipboard
Copied
Hello,
I've been trying to figure this out but I just don't understand why this is happening. I'm using sed (in cygwin) to append a javascript and iframe to topics but following the sed all topics become forbidden. It must be with how I did sed so I just wanted to find out:
if there is a way to modify the masterpage with some constant content and it will roll out to all child topics. I am trying to add an iframe and javascript to all topics. The code will be exactly the same for all topics (i've created a dynamic page that will display content base on the parent page). Would I use placeholder? Adobe scripting?
Hi,
You can use masterpages. Add the code you want in the header or footer of the masterpage. All topics associated with the masterpage will get that code. That means that the iframe is positioned above or below the topic content.
If you want it somewhere else, you probably want to add the code after you generated the output. You can use any Find/Replace tool for that, or create a script in RoboHelp to do that for you.
Greet,
Willam
Copy link to clipboard
Copied
Hi,
You can use masterpages. Add the code you want in the header or footer of the masterpage. All topics associated with the masterpage will get that code. That means that the iframe is positioned above or below the topic content.
If you want it somewhere else, you probably want to add the code after you generated the output. You can use any Find/Replace tool for that, or create a script in RoboHelp to do that for you.
Greet,
Willam
Copy link to clipboard
Copied
The header works fine, but I would prefer it if I can put in the body. The Find replace tool doesn't allow for multiple line replacement. I'm new to Adobe scripting so I jsut wnted to find out how you can access all topics and search through them for a pattern.
Copy link to clipboard
Copied
Hi,
The Find replace tool doesn't allow for multiple line replacement.
You can use a third-party tool for that. FAR is quite popular. See http://helpware.net/FAR/
See http://www.adobe.com/devnet/robohelp/articles/robohelp-extendscript.html for an introduction to scripting with RoboHelp.
The following script may be a good example script: http://www.wvanweelden.eu/robohelp/scripts/ierendertags
Be sure to check out the standard script provided by Adobe. Please post back if you have any questions.
Greet,
Willam
Copy link to clipboard
Copied
I simply added a JavaScript code to the header that inserts my html code following a document.getelementbytagname. It works nicely implementing a header to body injection.