MadCap Flare html manipulation

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets

MadCap Flare html manipulation

Postby jesseschmieg on Thu Sep 07, 2017 1:23 pm

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
jesseschmieg
Jr. Propeller Head
 
Posts: 2
Joined: Thu Sep 07, 2017 11:38 am

Re: MadCap Flare html manipulation

Postby Dave Lee on Thu Sep 07, 2017 11:49 pm

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.
Dave Lee
Master Propellus Maximus
 
Posts: 5034
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: MadCap Flare html manipulation

Postby jesseschmieg on Fri Sep 08, 2017 2:18 pm

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
jesseschmieg
Jr. Propeller Head
 
Posts: 2
Joined: Thu Sep 07, 2017 11:38 am

Re: MadCap Flare html manipulation

Postby Dave Lee on Sun Sep 10, 2017 11:53 pm

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.
Dave Lee
Master Propellus Maximus
 
Posts: 5034
Joined: Mon Mar 05, 2007 8:33 am
Location: UK


Return to Web-based Outputs

Who is online

Users browsing this forum: No registered users and 1 guest