MadCap Flare html manipulation

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
jesseschmieg
Jr. Propeller Head
Posts: 2
Joined: Thu Sep 07, 2017 11:38 am

MadCap Flare html manipulation

Post by jesseschmieg »

Hello,

We're using MadCap Flare to produce HTML5 output using top navigation. We've run into a number of scenarios that we would like to customize the html through some process during the build. For example, we would like to completely remove the alt text attribute from our logo link. Another example would be switching some of the html5 elements (nav/section) in the header. Is there any built in mechanism in Flare for doing such modification (perhaps something like a JavaScript script to run which can access and manipulate the html structure)? We're aware that we could run a post build process to manipulate files, but that would be cumbersome to modify the html as text.

Please let me know if there is anything like this in Flare.

Thank you,
Jesse
NorthEast
Master Propellus Maximus
Posts: 6363
Joined: Mon Mar 05, 2007 8:33 am

Re: MadCap Flare html manipulation

Post by NorthEast »

I'd suggest looking at jQuery - I use it a lot to manipulate HTML in Flare's output, and it's very easy to use (compared to writing native Javascript).
http://api.jquery.com/

I write my code in a js file, then add a link to that js file from my master page, which means it runs with all of the topics.

Flare already uses jQuery and includes it with HTML5 output, so you don't need to add a link to the jQuery js file yourself.
jesseschmieg
Jr. Propeller Head
Posts: 2
Joined: Thu Sep 07, 2017 11:38 am

Re: MadCap Flare html manipulation

Post by jesseschmieg »

Hi Dave,

Thank you for the quick response!

Your suggestion to use jQuery worked quite well and we were able to make the necessary modifications. Is there anything similar that could be used during the build process to have those changes reflected in our HTML files (as opposed to running the JS on our client side every time someone visits the page)?

Thanks,
Jesse
NorthEast
Master Propellus Maximus
Posts: 6363
Joined: Mon Mar 05, 2007 8:33 am

Re: MadCap Flare html manipulation

Post by NorthEast »

jesseschmieg wrote:Hi Dave,

Thank you for the quick response!

Your suggestion to use jQuery worked quite well and we were able to make the necessary modifications. Is there anything similar that could be used during the build process to have those changes reflected in our HTML files (as opposed to running the JS on our client side every time someone visits the page)?

Thanks,
Jesse
You can't can't add scripts to Flare's build process.

Any modifications to the HTML would have to be run after the build has completed.
Post Reply